Home > Bash, ssh, Tip > Change Centos ssh shell color

Change Centos ssh shell color

When trying to ssh to Cento servers (Versions 5.X, haven’t tried other versions yet), the default directory color blue doesn’t work well with terminals such as Mac OSX Terminal using dark-background and Windows ssh client Putty. I haven’t found a way to change the directory color for a specific user but one to change for ALL users including root. So if you have root access and cannot stand for the hard-to-read color combinations, do the following

1) Edit /etc/DIR_COLORS as root
2) Locate line
DIR 01;34 # directory
and change it into
DIR 01;33 # directory

3) Save the file
4) Do the same steps for file /etc/DIR_COLORS.xterm
5) New logins can now see the new directory color

What step 2) does basically is changing the directory color from blue into yellow (it actually looks golden on black background). Step 1-3 take care of Mac OSX Terminal using Homebrew scheme, step 4 is needed if there are putty users.

EDIT [ 06/07/2011 ]:
Just found the answer to changing dir colors for a specific user here:

Categories: Bash, ssh, Tip
  1. September 6, 2011 at 2:18 pm

    Had same problem – thanks for the quick fix.

  2. July 24, 2012 at 11:32 am

    Hey ricoch3n,
    if you want to change the dir color settings on a user basis, just create a “.dir_colors” in the home directory of the corresponding user and override the /etc/DIR_COLORS settings with it.

    • July 26, 2012 at 12:02 pm

      That works very nicely. Thanks for the tip.

  3. March 30, 2013 at 1:36 pm

    Nice thanks for the solution.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: