I previously blogged about how to add color to the ‘ls’ command utilizing an config file and alias. I then stumbled across a nugget of wisdom from a Foresight Linux user on the developers mailing list who gave a handy command that remedies some problems with missing color in a terminal.
On some distributions, the system-wide /etc/DIR_COLORS* files are removed or not present. This results in no colors being given inside of a terminal when looking for color directories and filenames. If you find yourself in this boat, try the following command to re-populate this setting:
devnet-> cd ~/<br /> devnet-> dircolors -p >.dircolors<br />
This should create a default profile for colors for your session if it hasn’t been done or was accidentally removed. For more information on the dircolors command try ‘man dircolors’. Please also note that dircolors command uses the environmental variable LS_COLORS to set your session.
This content is published under the Attribution-Noncommercial-Share Alike 3.0 Unported license.