Redhat Linux - change directory color

saravana_pc picture saravana_pc · Nov 24, 2011 · Viewed 29.3k times · Source

I am using Redhat Linux and the problem I am facing is that the "blue" colour of the directories is hardly visible on the black background. I found some posts on the web which asks to change some settings in the file /etc/profile.d/colorls.sh and /etc/profile.d/colorls.csh. However, this will change the colour settings for everyone who logs into the system. Could someone please let me know how I can change the colour settings that will affect only me?

Answer

William Pursell picture William Pursell · Nov 24, 2011

To specify the colors of the output of ls, you need to set LS_COLORS. In your .zshrc, try adding:

LS_COLORS="$LS_COLORS:di=00;33"

34 is blue, 33 is ... yellowish. Change that number and find what you like.

Use dircolors to get a feel for what LS_COLORS should look like and add -p to see a color list.