如何在centos 7安装 zsh

it2025-10-10  12

标题如何在centos 7安装 zsh

1 zsh 1.1 安装 sudo yum install zsh -y 1.2 切换到zsh chsh -s /bin/zsh 2 安装git sudo yum install git -y 3 安装oh-my-zsh 1)yum update -y nss curl libcurl sh -c “$(curl -fsSL 2) 3)https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)”

如果报错 curl: (7) Failed connect to raw.github.com:443; Connection refused 把 raw.github.com 改成 raw.githubusercontent.com 在浏览器种输入进入网址:www.ipaddress.com,查询raw.githubusercontent.com的ip。打开hosts文件 vim /etc/hosts

在最末尾插入 ip raw.githubusercontent.com 这个ip就是查询得到的ip,然后 sh -c “$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)” 4 oh-my-zsh高亮显示 4.1 下载并安装 git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting 4.2 激活插件 通过在~/.zshrc中加入插件的名字 vim ~/.zshrc plugins=( [plugins…] zsh-syntax-highlighting) 最后,source使得环境生效 source ~/.zshrc

5 历史命令 git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions 同样打开~/.zshrc文件编辑plugins,然后source vim ~/.zshrcplugins=( [plugins…] zsh-autosuggestions)source ~/.zshrc 问题: zsh: no matches found: vim ~/.zshrc 在最后添加 setopt no_nomatch

最新回复(0)