How to Install Zsh on Ubuntu a year ago
install zsh
sudo apt update
sudo apt install zsh -y
# check the installed version
zsh --version #zsh 5.8.1 (x86_64-ubuntu-linux-gnu)
#Initial Configuration, 选择0
zsh
#Set Zsh as Default Shell
echo $SHELL
chsh -s $(which zsh)
Install Oh My Zsh
sh -c "$(wget --no-check-certificate https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
编辑配置文件: ~/.zshrc
将ZSH_THEME="robbyrussell"
改为 ZSH_THEME="jonathan"
or ZSH_THEME="ys"
保存 退出
要想使配置生效,还需source一下
Enable Auto-Suggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
编辑配置文件: ~/.zshrc
修改plugins配置
plugins=(git zsh-autosuggestions)
Enable Syntax Highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
编辑配置文件: ~/.zshrc
修改plugins配置
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
Uninstall Zsh
sudo apt --purge remove zsh
Change the default shell back to Bash (or any other you want):
chsh -s $(which bash)
- 上一篇: nginx默认对文件上传大小有限制
- 下一篇: install autojump