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

When I ssh into a remote server from my terminal in Mac OS X Snow Leopard, I get all sorts of great context coloring. It makes it much easier to edit files in vi, gives good contrast when I ls -al, etc.

However, my local terminal doesn't have any of that context coloring. Is there a place I can choose those settings or some statements I can throw into my .profile file?

share|improve this question
up vote 6 down vote accepted

If you use bash, you can put this into your ~/.profile:

export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced

For vi, just enter :syntax on.

What are the color values?

The LSCOLORS specify the color values of the different items:

a = black
b = red
c = green
d = brown
e = blue
f = magenta
g = cyan
h = light gray
x = default

This works better for a dark background:

export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx

This works better for a bright background:

export LSCOLORS=ExFxCxDxBxegedabagacad

What are the positions of the colors?

Those are the positions of the values, in the order as they appear in LSCOLORS:



share|improve this answer
You have this answer macro'ed by now, right? – Daniel Beck Aug 17 '11 at 8:46
Huh? First time I've written an answer about that.. – slhck Aug 17 '11 at 8:56

Your Answer


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.