恢复linux系统文件夹颜色

Posted Python学习之路

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了恢复linux系统文件夹颜色相关的知识,希望对你有一定的参考价值。

/etc/DIR_COLORS 默认值

# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
NORMAL 00 # global default, although everything should be something.
FILE 00 # normal file
DIR 01;34 # directory
LINK 01;36 # symbolic link
FIFO 40;33 # pipe
SOCK 01;35 # socket
BLK 40;33;01 # block device driver

还原默认值

在~/.bashrc 文件内添加如下

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls=‘ls --color=auto‘

alias grep=‘grep --color=auto‘
alias fgrep=‘fgrep --color=auto‘
alias egrep=‘egrep --color=auto‘
fi

 















以上是关于恢复linux系统文件夹颜色的主要内容,如果未能解决你的问题,请参考以下文章