一、在用户家目录下建立.bash_profile文件bash
二、写入如下三行:export LS_OPTIONS='--color=auto'export CLICOLOR='Yes'export LSCOLORS='CxfxcxdxbxegedabagGxGx'ide
三、执行命令:source /Users/maple/.bash_profileit
若是root用户的终端也须要该颜色,启用root用户后使用root用户执行上面3个步骤便可。class