To change directory colors:

 open ~/.bashrc or .bash_profile file with an editor and make an entry somewhere in the file:

 

LS_COLORS=$LS_COLORS:'<choice>=<style>;<color>:' ; export LS_COLORS

 

Example: To change the directory entries to purple:

 

LS_COLORS=$LS_COLORS:'di=0;35:' ; export LS_COLORS

 

Kinds of files whose ls appearance can be specified (fill in <choice>) :

di = directory

fi = file

ex = file which is executable (i.e. has 'x' set in permissions).

ln = symbolic link

pi = fifo file

so = socket file

bd = block (buffered) special file

cd = character (unbuffered) special file

or = symbolic link pointing to a non-existent file (orphan)

mi = non-existent file pointed to by a symbolic link (visible when you type ls -l)

*.rpm = files with the ending .rpm

 

Some color codes:

30  = Black

31  = red

32  = green

33  = orange

34  = blue

35  = purple

36  = cyan

37  = grey

90  = dark grey

91  = light red

92  = light green

93  = yellow

94  = light blue

95  = light purple

96  = turquoise

 

Styles:

0   = default colour

1   = bold

4   = underlined

5   = flashing text

7   = reverse field

40  = black background

41  = red background

42  = green background

43  = orange background

44  = blue background

45  = purple background

46  = cyan background

47  = grey background

100 = dark grey background

101 = light red background

102 = light green background

103 = yellow background

104 = light blue background

105 = light purple background

106 = turquoise background

 

These can even be combined, so that a parameter like:

di=1;4;31;42

in your LS_COLORS variable would make directories appear in bold underlined red text with a green background!