1.修改 .bash_profile
终端输入:vim ~/.bash_profile
添加内容:
# enables colorin the terminal bash shell export export CLICOLOR=1 # sets up thecolor scheme for list export export LSCOLORS=gxfxcxdxbxegedabagacad # sets up theprompt color (currently a green similar to linux terminal) export PS1='[ 33[01;32m]u@h[ 33[00m]:[ 33[01;36m]w[ 33[00m]$ ' # enables colorfor iTerm export TERM=xterm-color
保存退出,使其生效
source ~/.bash_profile
2.选择配色
preference -- profiles -- default -- colors -- color presets
参照:https://www.jianshu.com/p/11a40a0b3385