DBAToolZ

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
root:[/root]#

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'

REFERENCE:

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
    Sommer:

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

Leave a Reply

Vitaliy Mogilevskiy - Solving ORACLE problems since 1996.

View Vitaliy Mogilevskiy's profile on LinkedIn

What you will find here is what works for me day in day out - 24x7x365 - simple ORACLE DBA Tools written using components that are available on every Unix platform with an ORACLE database -- sqlplus and KSH.

Do you have DBA questions? Head over to Ask DBA.

RSS DBA Forums


Recent Comments

  • NJGIN: Thank you for your lucid and accurate instructions!
  • E Konopka: A GREAT help, thank you!
  • Sachin: Thanks! This helped really well.
  • jeevan: Hi, how to calculate Oracle process maximum limit to set based on servers.
  • vivek: I am getting following error SQL*Plus: Release 11.1.0.7.0 – Production on Thu May 22 18:42:01 2014...

Categories

Blogroll


Archives