vim ~/.bash_profile
source ~/.bash_profile
加入以下几行:
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$'
然后在iTerm中进行以下设置:
Preferences->Profiles->Terminal->Terminal Emulation->Report Terminal Type,选择xterm-256color
最后,退出iTerm2终端后再次启动。打开Preferences->Profiles->Colors->Load Presets,选择你喜欢的配色方案即可。