Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'd like to change the blue color that Cygwin uses for directories. It is too dark to read on most screens.

share|improve this question
1  
echo -ne '\e]4;4;#00BFBF\a' # blue Running that command in the terminal will change the color to cyan, if you are using mintty You can change all of the colors: code.google.com/p/mintty/wiki/Tips#Changing_colours (Will move to answer when rep allows.) –  axiomx11 Jul 3 '12 at 19:43
    
Cygwin's ls doesn't use color 4 (dark blue) for directories, but color 12 (bold blue). Are you remoting to some other system? –  ak2 Jul 4 '12 at 12:27
add comment

3 Answers

up vote 2 down vote accepted

You probably get the colors from ls itself. You get this from invoking it as ls --color. You can either disable this alias, or you can change the colors. I find the colors useful, so I change the colors.

There are defaults, but you can override these by use of the LS_COLORS environment variable. You can set this manually, or you can use the tool dircolors to help you.

share|improve this answer
    
For the curious: This not only works in Cygwin, but also on the Linux shell. So it might be useful for xterm users, too ;) –  Izzy Jul 3 '12 at 22:17
    
Yes, I found the colors were coming from my remote CentOS server. I put a copy of /etc/DIR_COLORS in my home directory, and changed DIR 01;34 # directory. –  axiomx11 Jul 5 '12 at 13:52
add comment

If you're using MinTTY (which you almost certainly are, unless you know you're doing something special), the easiest method is to change your MinTTY settings. You can do this by editing your ~/.minttyrc file.

Try running the below, then restarting MinTTY:

echo 'Blue=127,127,255' >> ~/.minttyrc
echo 'BoldBlue=191,191,255' >> ~/.minttyrc

This will work for everywhere that blue colour turns up, not just in the results from ls.

share|improve this answer
    
I had blue comments in vim as well, which this fix remedies. –  Alexander Torstling Apr 12 '13 at 8:23
add comment

There is also a command line option --option that allows you to change colours

E.g. The following changes the blue to something more readable

C:\cygwin\bin\mintty.exe --option Blue=128,128,192 -i /Cygwin-Terminal.ico -
share|improve this answer
add comment

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.