Colorize your Terminal shell on Mac OS

Apple’s default settings for BASH are less than lovely — just shades of gray.

Terminal with Apple's default colors

Here’s how to add color to BASH for your visual enjoyment.

Here’s what we’re going to create:

Terminal with new colors

From Terminal, edit your .bash_profile:

vi ~/.bash_profile

Add to it:

export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ " export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
alias ls='ls -GFh'

Save the changes.

Reload your .bash_profile from Terminal:

. ~/.bash_profile

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.