首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 操作系统 >

debian 配置文件夹色彩

2012-06-26 
debian 配置文件夹颜色debian目录颜色的更改方法1.修改~/.bashrc中:# enable color support of ls and als

debian 配置文件夹颜色
debian目录颜色的更改方法
1.修改~/.bashrc中:

# enable color support of ls and also add handy aliasesif [ "$TERM" != "dumb" ]; then    #eval "`dircolors -b`"    eval "`dircolors ~/.dircolors`"    alias ls='ls --color=auto'    #alias dir='ls --color=auto --format=vertical'    #alias vdir='ls --color=auto --format=long'fi

2.$dircolors -p > ~/.dircolors

3.修改~/.dircolors中的:"DIR 01;34 # directory"为自己喜欢的颜色(共有8种颜色可选,具体请看.dircolors注释).

root用户打开文件~/.bashrc。找到如下几行:
#cd
#vim .bashrc
# You may uncomment the following lines if you want `ls' to be colorized:export LS_OPTIONS='--color=always' eval "`dircolors`" alias ls='ls $LS_OPTIONS' alias ll='ls $LS_OPTIONS -l' alias l='ls $LS_OPTIONS -lA'

按照第一行所说,将下面五行的注释去掉,则ls命令将显示颜色。但颜色可能很古怪,也许很正常,总之,不是我们自己根据自己对颜色的喜好定置的。
要定制自己喜欢的颜色,可如下操作:
dircolors -p >~/.colourrc
这将在root用户根目录下生成.colourrc文件,这个文件的注释极其详细,按照注释,修改颜色参数可定制颜色。然后,将上面红色的一行改变为:
eval "`dircolors .colourrc`"
运行source ~/.colourrc命令。
好了,ls可按照定制的颜色显示了。

热点排行