先安装oh my zsh
vi ~/.zshrc 修改ZSH_THEME="agnoster"
为了隐藏user@hostname 在.zshrc里面加上```
DEFAULT_USER=whoami
#安装字体库[powerline-font](https://github.com/powerline/fonts)
git clone https://github.com/powerline/fonts.git
cd fonts
./install.sh
cd ..
rm -rf fonts
terminal偏好设置,修改字体为Meslo LG S DZ Regular for Powerline,重启terminal 效果如下
![](http://upload-images.jianshu.io/upload_images/5967669-c9779f71325c836c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)