Names of directories in output of ls are blue on green and difficult to read.

If you mount NTFS volumes, you will find that the directory names in ls output are impossible to read. They are blue text on a green background.

On a default Ubuntu setup, look in your ~/.bashrc file and you will see the ls colors are determined by a program called dircolors. Actually, dircolors has some predefined colors compiled into it, and it outputs Bourne shell code that sets the LS_COLORS environment variable to have these colors, and this code is eval'd in .bashrc.

Run:


dircolors -p

to see the predefined colors. There is a line like this:


OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky

This is what screws up the directory names, and it looks intentional in order to alert you of a possible security issue.

To change this, create some file, for example, ~/.dircolorconfig, and in it write


OTHER_WRITABLE 01;34 # dir that is other-writable (o+w) and not sticky

to change the color to be the same as the normal directory color (bold and blue). Then in ~/.bashrc replace the dircolors line with:


eval "`dircolors -b ~/.dircolorconfig`"

Open a new terminal, and you can read directory names again!