Lightweight Oracle DBA Tools


Mac OS X Lion Terminal.app not showing ANSI colors on Linux – here’s a fix

Connecting to Linux node from Mac’s Terminal.app and not seeing ANSI colors? Here’s a fix:

On your target Linux node check your /etc/DIR_COLORS file (or equivalent):

root:[/root]# grep TERM /etc/DIR_COLORS
# Below, there should be one TERM entry for each termtype that is colorizable
TERM linux
TERM console
TERM con132x25
TERM con132x30
TERM con132x43
TERM con132x60
TERM con80x25
TERM con80x28
TERM con80x30
TERM con80x43
TERM con80x50
TERM con80x60
TERM cons25
TERM xterm
TERM rxvt
TERM xterm-color
TERM color-xterm
TERM vt100
TERM dtterm
TERM color_xterm
TERM ansi
TERM screen
TERM screen.linux
TERM kon
TERM kterm
TERM gnome
TERM konsole

Make sure the “TERM” definition in this file matches your Terminal.app Preferences-> Advanced -> Emulation Options:

MAC OS X Lion: Terminal.app Emulation Options to enable color in Linux bash

By default the Terminal Emulation was set to “term-256color” and that option is not recognized in /etc/DIR_COLORS.

And if you want ANSI colors for ls -l to work in your MAC terminal on your local MAC machine add the following to your $HOME/.bash_profile:

alias ls='ls -G'


Where is ‘ls = ls –color=tty’ alias defined on Linux
IR_Black for OS X Lion

2 Responses to “Mac OS X Lion Terminal.app not showing ANSI colors on Linux – here’s a fix”

  1. 1
    OSX Lion Terminal Colors « MwF:

    […] out this post for the […]

  2. 2

    It’s very easy to find out any matter on web as
    compared to books, as I found this paragraph at this web site.

Have feedback? Join our community: kb.dbatoolz.com

Recent Comments

  • wes: thanks for this, it’s stupid Oracle included this in recent versions of OPatch.
  • Jie Dai: Thank you a thousand for your guide.
  • NJGIN: Thank you for your lucid and accurate instructions!
  • E Konopka: A GREAT help, thank you!
  • Sachin: Thanks! This helped really well.