1.首先在~/.bash_profile中写入
export CLICOLOR=1
export LSCOLORS=gxfxcxdxbxegedabagacad
export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;36m\]\w\[\033[00m\]\$ '
export TERM=xterm-color
export CLICOLOR=1
export LSCOLORS=gxfxcxdxbxegedabagacad
export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;36m\]\w\[\033[00m\]\$ '
export TERM=xterm-color
2.在iterm2中选择preference->profiles->terminal中report terminal type选择xterm-new
3.去github上下载你喜欢的主题(也可以使用自带的dark或light)
https://github.com/mbadolato/iTerm2-Color-Schemes/tree/master/schemes
4.在iterm2中选择preference->profiles->colors->load preets-> import 导入刚才从github上下载的主题,然后选择
5.大功告成