查看可用的shell
cat /etc/shells
centos 安装zsh
yum install -y zsh
安装on-my-zsh
git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
#如果github无法访问,可使用以下地址
#git clone https://github.com.cnpmjs.org/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
切换默认shell
chsh -s /bin/zsh
编辑zshrc文件,修改主题,添加alias和配置插件
vim ~/.zshrc
(推荐主题ZSH_THEME="jtriley")
应用zshrc文件
source ~/.zshrc