首先我们安装zsh,并切换默认的shell为zsh,之后重启进入zsh

sudo apt-get install zsh
chsh -s /bin/zsh
sudo shutdown -r now

之后我们安装oh-my-zsh,因为网络的原因所以设置了代理

wget -e https_proxy=192.168.65.100:7890 https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh
chmod +x install.sh
./install.sh

然后再安装zsh命令自动补全插件zsh-autosuggestions

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

之后编辑~/.zshrc文件,修改ZSH_THEME="simple",并且在plugins里面添加zsh-autosuggestions配置

ZSH_THEME="simple"
plugins=(git zsh-autosuggestions)