安装zsh
安装Git
sudo yum install git -y
安装zsh 然后安装on-my-zsh
yum install -y zsh
chsh -l 展示终端列表
chsh -s /bin/zsh 切换成zsh
#安装on-my-zsh 国内
sh -c "$(wget -O- https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh)"
期间可能执行此脚本会处于阻塞状态,如果不愿等可以直接把 oh-my-zsh文件夹+.zshrc文件 复制到/root 下,当然我这个文件夹已经把下面的插件安装好了,所以下面的命令也无需执行。我分享不出来:非VIP暂不支持分享zip文件
查看主题 vim ~/.zshrc 我选择 robbyrussell 编辑文本内容:ZSH_THEME=”robbyrussell”
修改完配置文件需要重新加载:source ~/.zshrc<br /> 备注:主题可以在此处预览:[https://github.com/ohmyzsh/ohmyzsh/wiki/Themes](https://github.com/ohmyzsh/ohmyzsh/wiki/Themes)
插件安装:
zsh-syntax-highlighting:高亮(命令正确时会绿色显示,否则红色显示)此插件需要安装:
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
慢就用国内的gitee
git clone https://gitee.com/gloriaied/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
- zsh-autosuggestion:自动提示
git clone git://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
慢就用国内的gitee
git clone https://gitee.com/hailin_cool/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
- 网络代理
source ~/.zshrc 完成 或者zshplugins=(git
zsh-autosuggestions
zsh-syntax-highlighting
)
zsh-proxy 一键配置常用代理
可通过如下命令查看是否设置了代理export http_proxy=http://192.168.1.104:10809
export https_proxy=http://192.168.1.104:10809
export no_proxy=localhost,127.0.0.1,192.168.1.0/24,10.100.0.0/16,10.96.0.0/12,::1
需要注意一点那就是假设你之前配置了代理,但是代理无效这时候你想要禁止代理,可以使用如下命令实现:echo $http_proxy
在顺道说一点就是在桥接网络模式下,虚拟机无法ping通主机ip可能是对应的防火墙未关闭unset http_proxy
unset https_proxy