Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

OS X terminal is not using colors for highlighting output from different commands, for example ls.

When compared with other systems like Ubuntu, this is a big loss of accessibility/productivity.

What solutions do I have to improve this experience? For the moment I found only this guide for colored ls output under OS X but I am looking for a more complete solution.

share|improve this question

2 Answers 2

  • you should change the Terminal.app preferences->advanced into xterm-color.
  • enter the following into your ~/.profile

for enable colored ls:

export CLICOLOR=1;
export LSCOLORS=exfxcxdxbxegedabagacad;

and from now, you will get colored ls output.

share|improve this answer
    
+1 For proper terminal colour definitions. In general colours are personal but I would recommend to enable features more on a system-based way than by adding a plugin. –  Tigran Khanzadyan May 30 '11 at 16:55
    
+1 - Does what it says on the tin. Cheers. A question: Where would I put such a config file at a more general level (i.e. not in ~)? –  boehj May 30 '11 at 20:10
2  
IMHO the your $HOME/.profile is the best place, but if you want can put them into system wide /etc/profile. e.g. sudo open /etc/profile –  jm666 May 30 '11 at 20:13
    
Thanks. –  boehj May 30 '11 at 22:38
    
Note that prior to Lion, the default $TERM value is xterm-color, so you rarely need to change it. As of Mac OS X Lion 10.7, Terminal's default $TERM value is xterm-256color, which enables programs that can take advantage of the extended 256 color palette. On Lion and later, using xterm-color is discouraged, because it describes an older, less-featureful branch of xterm, and Lion Terminal is more compatible with modern xterm. So you should generally stick with xterm-256color or just xterm. –  Chris Page Aug 26 '11 at 5:15

You can easily change the ls output color by installing "TerminalColors" plugin. I am a big fan of "Solarize" theme which looks terrific on my Mac.

share|improve this answer
1  
Looks nice. Will try it this evening. –  Loïc Wolff May 30 '11 at 14:10
1  
+1 thanks, Solarize is nice and I will use it, but the question was not about how to "tune" the colors, it was about adding colors to the output of different commands. –  sorin May 30 '11 at 14:54

Your Answer

 
discard

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.