需要安装zsh和oh my zsh。一个是shell,一个是用来管理shell的开源框架。
1)安装zsh
sudo yum install zsh
2)切换shell
chsh -s /bin/zsh
3)安装oh my zsh
git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
4)安装常用的插件
cd ~/.oh-my-zsh/custom/plugins
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
git clone https://github.com/zsh-users/zsh-autosuggestions.git
5)配置插件
vim ~/.zshrc
找到文件中plugins对应的那一行
...
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
...
6)使配置生效
source ~/.zshrc