Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

How do you customise the default colours in the shell? Say I want to make the standard cyan, magenta and yellow slightly lighter.

There is a method shown here for OS X Terminal using drag and drop with the colour picker, but how do you do it manually in the dotfiles (.bashrc .bash_profile .zshrc etc)?

share|improve this question

migrated from Sep 2 '09 at 2:26

This question came from our site for professional and enthusiast programmers.

You should write which terminal client you use. – miloshadzic Sep 2 '09 at 7:54
Well, I am using OS X Terminal, but I want to make my prefs portable via a dotfiles repo like this – user9848 Sep 4 '09 at 5:32

Check into creating a .Xdefaults file on your home directory.

Here is a good .Xdefaults syntax guide:

A snippet of my own .Xdefaults:

Xterm*background: wheat
Xterm*foreground: black
Xterm*scrollBar_right: true
Xterm*scrollTtyKeypress true
Xterm*colorBD: 1
Xterm*font: courier
Xterm*saveLines: 10000
Xterm*geometry: 120x50

share|improve this answer
up vote 3 down vote accepted

Bash has nothing to do with it. The way colors are is depending on your terminal. If you're using OS X Terminal - you have to use its way to configure colors.

share|improve this answer

One thing you can do with bash alone is to have a different color on your prompt on different computers/accounts.

My prompt is red when I'm root for example.

share|improve this answer

Your Answer


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