为什么要修改这个颜色呢?因为我使用ubuntu时,输入ls命令,这个文件夹目录的颜色蓝色太深了,看都看不清楚文字了.
好!我们马上进行修改,我这里主要是修改文件夹的颜色.
1.通过vi 打开 ~/.bashrc 文件
vi ~/.bashrc
2. 将文件内容移至到最后,加入下面这行代码
LS_COLORS=$LS_COLORS:'di=0;35:' ; export LS_COLORS
3 保存,退出文件,重启系统,这时候你在输入 ls 文件夹的颜色改为紫色了.
这里说明下参数:
di : 文件夹的意思,下面更多的配置参数
di = directory fi = file ln = symbolic link pi = fifo file so = socket file bd = block (buffered) special file cd = character (unbuffered) special file or = symbolic link pointing to a non-existent file (orphan) mi = non-existent file pointed to by a symbolic link (visible when you type ls -l) ex = file which is executable (ie. has 'x' set in permissions). *.rpm = files with the ending .rpm
0;35 紫色的颜色位置,颜色值,我们这里展示一些:
Blue = 34 Green = 32 Light Green = 1;32 Cyan = 36 Red = 31 Purple = 35 Brown = 33 Yellow = 1;33 white = 1;37 Light Grey = 0;37 Black = 30 Dark Grey= 1;30
好了,这里只做一点记录,更详细的可以去ubuntu官网查看.