# 安装zsh
sudo apt-get install zsh
# 把当前用户的 Shell 改成 zsh
chsh -s /bin/zsh
注意:不要使用 sudo。
# 安装 oh-my-zsh
# 安装 git
sudo apt-get install git
# 安装 oh-my-zsh
ZSH=/usr/local/oh-my-zsh REPO=https://gitee.com/mirrors/oh-my-zsh.git REMOTE=https://gitee.com/mirrors/oh-my-zsh.git sh -c "$(curl -fsSL https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh)"
# 安装 zsh-syntax-highlighting 语法高亮插件
git clone https://gitee.com/gxkgle/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
# 安装 zsh-autosuggestions 语法历史记录插件
git clone https://gitee.com/Kagura/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# 配置插件
plugins=(git zsh-syntax-highlighting zsh-autosuggestions)
# 配置主题
ZSH_THEME="ys"
# 卸载
sudo sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/uninstall.sh)"
chsh -s /bin/bash
# 手动更新
upgrade_oh_my_zsh