tags:

views:

3637

answers:

4

Hi,

How can I configure Mac Terminal to have color ls output? I am using MacOS 10.5

+8  A: 

You can add

alias ls='ls -G'

to your ~/.bash_profile to get colored ls output.

Barry Wark
Mine is alias ls="ls -Gp" — the -p adds a slash after each directory. For me, it provides that much more visual differentiation, which is helpful.
Quinn Taylor
+14  A: 

Edit:

~/.bash_profile

or

~/.profile

and add the following two lines:

export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad

you can use this if you are using a black background:

export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
Bill Szerdy
Or `gxBxhxDxfxhxhxhxhxcxcx` on black background
Mikulas Dite
A: 

Bill - Thanks, setting the ~/.profile to export as you suggested solved the problem.

sa125
+2  A: 

If you want a readable mac os x terminal color scheme, you may want to look into this:

http://blog.infinitered.com/entries/show/6

I've been using this for over a year now, and I might not be able to function without it!

Jeff