由於 CentOS 的 console 中,資料夾預設文字顯示顏色都是深藍字,但是我都用黑底的 console ,每次資料夾名稱都看得非常吃力。
因此拜孤狗大神找修改 console 顯示文字顏色的方法,順便記錄一下。


1. 編輯 /etc/DIR_COLORS.xterm (如果修改後,顯示沒改變,請改編輯 /etc/DIR_COLORS)
找到底下這片段:

# Below are the color init strings for the basic file types. A color init
# string consists of one or more of the following numeric codes:
# Attribute codes:
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# 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 00;34;46 # directory
LINK 00;36 # symbolic link
FIFO 40;33 # pipe
SOCK 00;35 # socket
BLK 40;33;01 # block device driver
CHR 40;33;01 # character device driver
ORPHAN 01;05;37;41 # orphaned syminks
MISSING 01;05;37;41 # ... and the files they point to


2. 修改 DIR 00;34 這一行
例如改成 DIR 00;34;46 ,這樣就會變成淺藍底深藍字

3. 存檔後,重開一個 Console 就可以看到新設定的顯示了。

arrow
arrow
    文章標籤
    console change color centos
    全站熱搜

    mark528 發表在 痞客邦 留言(0) 人氣()