安装
sudo apt install zsh
更改配置
/etc/pam.d/chsh
文件中的
auth required pam_shells.so
替换为
auth sufficient pam_shells.so
然后切换默认shell
$ chsh -s /usr/bin/zsh
退出重新登录即可默认进入zsh
安装oh-my-zsh
首先需要安装git
apt install git
curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh > install.shsh ./install.sh
添加自动补全插件
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
并在文件.zshrc中添加
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh