一、工具
- iTerm2
- Oh My Zsh
- agnoster主题
二、步骤
- 安装iTerm2
- 将当前shell切换为zsh
- 通过
cat /etc/shells
命令查看当前系统已有的shell -
echo $SHELL
命令查看当前选中的shell -
chsh -s /bin/zsh
可以切换shell为zsh
- 安装Oh My Zsh:
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
三、切换主题
- 所有主题在线预览:https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
- 打开
.zshrc
文件(vi ~/.zshrc
),在搜索ZSH_THEME
,等号后的即是需要选则的主题ZSH_THEME="agnoster"
- Solarized Dark配色方案</br>下载完成之后解压,在iTerm2的Preferences——Profiles——colors——Load Presets——Solarized Dark即可设置终端配色