Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

When I do ls, the blue color is virtually impossible to read quickly or at a distance (screenshot below). I really want to change that to a readable color (lighter blue maybe?).

The command to change it is something like: export PS1="[\\u@\\H \\W \\@]\\$" but that is not obvious at all what each part means (and it changed the wrong line type).

How do I change the blue? Thanks.

alt text

share|improve this question

3 Answers 3

up vote 4 down vote accepted

See dircolors(1) and dir_colors(5).

To disable colors until you find some you like, use \ls.

Here's a quick sample of using custom colors (in this case, cyan directory listings; though that clashes with the color for symlinks, there isn't going to be a "lighter blue"):

$ echo 'DIR 01;36' > ~/.dir_colors
$ eval $(dircolors -b ~/.dir_colors)
$ ls --color

To make this the default, you can call dircolors as above in your initialization file.

share|improve this answer

Your screenshot looks like it came from PuTTY, which does indeed let you change the color values used. To change it, go to PuTTY's settings(either before you open the connection or by right clicking on the title bar and clicking Change Settings), go to Window and then Colors. In the list box on the right, click ANSI Blue and increase some combination of the 3 numbers on the far right.

share|improve this answer

Chances are your directory color is set to 00;34. If you change it to 01;34 it'll be a little bit lighter shade of blue.

In your ~/.bashrc file you may have a line similar to this:

eval "`dircolors -b`"

Below that line, add this:

LS_COLORS="$LS_COLORS"':di=01;34:'

You could enter that line at a shell prompt to try it out, first if you'd like.

If you reread (source) the file:

. ~/.bashrc

or start a new session, you should see the new color.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.