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

  • 3
    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, 2012 at 19:43
  • 1
    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, 2012 at 12:27
  • Cygwin uses for directories : The Cygwin itself has no preferences for colours. Colouring is done by the the programs which produce output, and you have to define the colours depending on the respective program. You can verify this by doing a echo * : You will see that the directories are not coloured differently. Oct 20, 2021 at 8:10

4 Answers 4


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.

  • 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, 2012 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, 2012 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 from within a Cygwin shell (which would be what you get when you start Cygwin using the Desktop or Start Menu link), 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.

  • 1
    I had blue comments in vim as well, which this fix remedies. Apr 12, 2013 at 8:23
  • Excellent, thank you so much. That was annoying. Jul 2, 2015 at 19:58
  • But the settings don't persist. See this question stackoverflow.com/q/69555256/2348597
    – Greg
    Oct 17, 2021 at 11:45
  • @Greg the settings should persist; there's clearly something odd going on for you that means the normal solution isn't working. But I couldn't say what without a lot more detail.
    – me_and
    Oct 18, 2021 at 20:29

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 -

Another way of looking at this problem is that the default "Dark Blue" color used by CMD Powershell Bash etc. on Windows is too dark. You can change it by:

  • Click the top right icon
  • Click Properties
  • Click the Colors tab
  • Select the 2nd Dark Blue color
  • Change Blue: 128 to 255
  • Hit tab to save the value
  • Select the original background color (Usually black)
  • Click OK

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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