Skip to content

How to Change Colors for ls command in xterm

2011 September 9
by PK


I like to us a dark background on my ssh terminal. On WebFaction, their terminal environment is setup to output colors on commands like “ls”. That is great except the default directory names ended up in blue, which is impossible to read on a black background.

There is a easy way to fix this:

  1. copy the system default color settings from /etc/DIR_COLORS into your home directory and name it .dir_colors
  2. edit your copy of .dir_colors file to change the colors.
  3. For example, I change it to white:

cp /etc/DIR_COLORS ~/.dir_colors

# than change this line from DIR 01;34    to:
DIR 01;37       # directory

Original Screen:

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Posterous
  • Tumblr
  • Twitter
No comments yet

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS