Sunday, August 24, 2008

Color Code Your Mac Terminal

Something I realized on my Mac is that the terminal isn't color coded. It is however when you ssh to a linux machine but not locally. However there is a quick and easy fix..

From the terminal open the following file (create if it don't exist) in home directory with your favorite text editor (vi should work fine): "~/.bash_profile"
Add the following lines:

export TERM=xterm-color
alias ls='ls -G'
alias ll='ls -hl'

Your 'ls' command should now display some color like this:

1 comment:

sap implementation guide said...

I am not very familiar with MAC. I worked on Mac only twice or thrice but I like it. I like your idea of to color code Mac terminal. This is a good practice. I am going to try it when I work next time on Mac. I'll surely share my experience of doing that with you.