The steps as below
1) To have the color to have effect in root , copy the file to root directory
cp /etc/DIR_COLORS /root/.dircolors
or
To have the color to have effect in user account, copy to home directory
cp /etc/DIR_COLORS /home/.dircolors
2) use any editor to modify the file (.dircolors)
3) Scroll down until you find this: DIR XX;XX # directory (XX = 2 digits number)
4) Change the font color using the code shown below. For example if I want the folder to be shown as yellow with black background i will change the line to DIR 33;40 # directory
5) Exit from your shell window, login again. Type ls to see the effect, Volla!
Besides directory, you can change other color settings in the same file.
No comments:
Post a Comment