How to Change Colors for ls command in xterm

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: