一、安装zsh
首先,先检查自己的shell:
echo $SHELL
如果显示是bash
,则安装zsh:
yum install -y zsh
切换zsh:
chsh -s /bin/zsh
二、安装oh-my-zsh
cd ~
git clone https://github.com/ohmyzsh/ohmyzsh.git
cd ohmyzsh/tools
./install.sh
三、安装插件
git clone https://github.com/wting/autojump.git $ZSH_CUSTOM/plugins/autojump
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
vim ~/.zshrc
plugins=(git zsh-autosuggestions zsh-syntax-highlighting autojump)
source ~/.zshrc