- 检查当前可用的shell:
cat /etc/shells
# /etc/shells: valid login shells
/bin/sh /bin/bash
usr/bin/bash
/bin/rbash
/usr/bin/rbash
/bin/dash
/usr/bin/dash
- 查看当前使用的shell:
echo $SHELL
- 安装zsh shell
sudo apt install zsh
- 切换shell
chsh -s /bin/zsh
- 安装oh-my-zsh
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
- 下载 zsh-syntax-highlighting 语法高亮插件
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh}/plugins/zsh-syntax-highlighting
- 下载 zsh-autosuggestions 自动提示插件
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh}/plugins/zsh-autosuggestions
- 配置.zshrc文件
vim ~/.zshrc
plugins=(git zsh-syntax-highlighting zsh-autosuggestions)
- 更新.zshrc
source ~/.zshrc