一般来说,直接访问官网查看具体的安装流程 https://ohmyz.sh/
# centos
yum instal zsh
# ubuntu 或者 debian
sudo apt install zsh
然后下载 oh-my-zsh 安装脚本
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
执行完之后,推荐安装一个热门插件: zsh-autosuggestions
查看安装帮助:https://github.com/zsh-users/zsh-autosuggestions/blob/master/INSTALL.md
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
然后修改 zsh 配置文件
vi ~/.zshrc
核心配置,增加刚刚的那个插件
plugins=(git zsh-autosuggestions)
在刷新一下
source ~/.zshrc