zsh
当前环境shell
echo $SHELL
查看系统自带哪些shell
cat /etc/shells
安装zsh
yum install zsh # CentOS
brew install zsh # mac安装
将zsh设置为默认shell
# CentOS
chsh -s /bin/zsh
# Mac如下
# 在 /etc/shells 文件中加入如下一行
/usr/local/bin/zsh
# 接着运行
chsh -s /usr/local/bin/zsh
oh-my-zsh
ohmyz https://ohmyz.sh/
github https://github.com/robbyrussell/oh-my-zsh
安装
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)";
查看主题
ls ~/.oh-my-zsh/themes
修改zsh主题
vim ~/.zshrc
ZSH_THEME="candy"
参考 zsh+on-my-zsh配置教程指南(程序员必备)【已备份】
问题
1、安装了zsh之后 ~/.bash_profile
文件设置的环境变量不起作用
$ vim ~/.zshrc
source ~/.bash_profile # 增加这行
</div>