Tuesday, August 4, 2009

Make the "ls --color" lighter and more readable

In some Linux distribution, the default color skim is quite annoying. The "blue" is too dark of "ls --color" command, and it is almost invisible. Here is one tip to resolve the problem:

open ~/.bashrc and insert the following line:
#This works for BASH shell
export LS_COLORS="no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;00:cd=40;33;00:or=00;05;37;41:mi=00;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:"

3 comments:

  1. OMG awesome, I've been looking for how to do this, the default ls colors on my work machine are awful. Thanks for the post!

    ReplyDelete
  2. I second: that is very useful, and my eyes thank you!

    ReplyDelete
  3. Great, I added it into /etc/bashrc to make it available to any user...
    very useful thanks!

    ReplyDelete