ÒòΪÖն˶¼ÊÇĬÈϺÚÉ«µÄ£¬µ«ÊÇ£¬ËüÒ²ÊÇ¿ÉÒÔ±äÉ«µÄ¡£¶øÇÒ»»É«ºó£¬²»µ«¿ÉÒÔÆðµ½ÃÀ»¯µÄ×÷Óã¬Í¬Ê±Ò²Äܱ£»¤ÊÓÁ¦¡£
²½Ö裺
1¡¢ÈÃÖÕ¶ËÏÔʾ²ÊÉ«×ÖÌå
ĬÈÏ°²×°ºÃ Debian ϵͳºó,´ó¼Ò»á·¢ÏÖÓà ls ÃüÁî²»´ø²ÎÊý£¬²»»áÏÔʾ²ÊÉ«¡£¿É¼ÓÒ»¸ö --color ²ÎÊýÀ´ÏÔʾ²ÊÉ«¡£
$ ls --color
2¡¢ÐÞ¸Ä .bashrc Îļþ
ÿ´Î¶¼´ø²ÎÊýδÃâÓÐЩÂé·³£¬×îºÃµÄ·½·¨ÊÇ°ÑËüдµ½Ä¬ÈÏÅäÖÃÎļþ .bashrc Àï,λÓÚÓû§Ä¿Â¼¡£
$ nano ~/.bashrc
´úÂë:
# enable color support of ls and also add handy aliases
if["$term" !="dumb"];then
export LS_OPTIONS='--color=auto'
eval "`dircolors`"
alias ls='ls $LS_OPTIONS'
fi
È¥µôĬÈϵÄ×¢Êͺ󣬱£´æÍ˳ö£¬ÖØдò¿ªÒ»¸öÖնˣ¬ÔËÐÐ ls ÃüÁî¾Í¿ÉÒÔ¿´µ½²ÊɫЧ¹ûÁË¡£