Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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: (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
up vote 3 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

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
Excellent, thank you so much. That was annoying. – Grant Bowman Jul 2 '15 at 19:58

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .