Simple Tricks to Improve the Terminal Appearance in Mac OS X

Feb 5, 2013 - 48 Comments

The standard terminal appearance is just boring old black text on a white background. Apple included a few nice preset themes too, but to really make your terminals appearance stand out you’ll want to take the time to customize it yourself. While some of these tweaks are admittedly pure eye candy, others genuinely improve the command line experience and make using the terminal not only more attractive but easier to scan.

Improve the Terminal appearance in Mac OS X

Follow along and try them all, or just pick and choose which makes the most sense for you.

Modify Bash Prompt, Enable Colors, Improve ‘ls’

At a bare minimum, let’s get a better bash prompt, improve the output of the frequently used ls command, and enable colors. This is all done by editing the .bash_profile or .bashrc located in the home directory, for the purpose of this walkthrough we’ll use .bash_profile:

  • Open Terminal and type nano .bash_profile
  • Paste in the following lines:
  • 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'

  • Hit Control+O to save, then Control+X to exit out of nano

The first line changes the bash prompt to be colorized, and rearranges the prompt to be “username@hostname:cwd $”

The next two lines enable command line colors, and define colors for the ‘ls’ command

Finally, we alias ls to include a few flags by default. -G colorizes output, -h makes sizes human readable, and -F throws a / after a directory, * after an executable, and a @ after a symlink, making it easier to quickly identify things in directory listings.

Pasted in properly, it should look like this:

Improve the Terminal appearance

Open a new terminal window, run ls, and see the difference. Still not satisfied with the appearance, or have you already done that? There’s more to do.

Enable Bold Fonts, ANSI Colors, & Bright Colors

This will be theme and profile dependent, meaning you will have to adjust this for each theme. Most themes have ANSI color on by default, but enable it if it’s not.

  • Pull down the Terminal menu and choose “Preferences”, then click the “Settings” tab
  • Choose your profile/theme from the left side list, then under the “Text” tab check the boxes for “Use bold fonts” and “Use bright colors for bold text”

Enable bold fonts and bright colors in Terminal

This makes things like directories and executables be bold and brighter, making them easier to spot in listings.

Consider Customizing ANSI Colors

Going further with ANSI colors, if you discover that certain text contrast or text colors are hard to read with a specific profile or against a specific background color in Terminal, you may want to manually adjust the ANSI colors used by Terminal app, this is done through the Preferences > Profiles > Text section:

Change ANSI colors in Terminal

Generally it’s best to adjust ANSI colors to be near their intended color mark but in the realm of being easier to read, a shade of grey to replace black for example.

Adjust Background Opacity, Blur, & Background Image

After you have colorization squared away, adjusting the terminals background appearance is a nice touch:

  • Back in Terminal Preferences, choose the theme from the left side, then go to the “Window” tab
  • Click on “Color & Effects” to adjust the background color, opacity, and blur – opacity at 80% or so and blur at 100% is pleasant on the eyes
  • Click on “Image” to select a background picture. Dark background pictures are better for dark themes, light for light, etc

Adjust the Terminals background and appearance

Opacity and blur alone tend to be enough, but going the extra step to set a background picture can look either really nice or completely garish. You make the call.

Terminal window with background image in Mac OS X

Install a Theme

Another approach is to use Terminal themes like IR Black, which are simple to install, add custom colors, and make the command line much more attractive. Here are three popular themes:

You can also easily create your own by spending some time with Terminal Preferences and setting colors and fonts to what you like.

New Terminal vs Old Terminal

Put it all together, and you should have something like this:

Better looking terminal in Mac OS X

Which is a bit more interesting to look at than this, right?

Command prompt

Have a useful bash prompt or some other customization tip? Let us know in the comments.

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: William Pearson in Command Line, Tips & Tricks


» Comments RSS Feed

  1. parakeet says:

    Text makes a big impact. I like Monaco as a font, anti-alias is a must, and use Command+ and Command- to change the font size on the fly depending on how much space you need.

    And don’t forget to use Full Screen Terminal if you really need to focus.

  2. John Robinson says:

    Control-X does not work in Mountain Line Terminal. Also using the arrow keys did not work in the terminal window.

  3. koraz says:

    Thanks, it’s indeed better than the default one. Colors is a must for terminal users. Thank you !

  4. Leo M. says:

    In addition, there’s a nice LSCOLORS generator if you’d like to tweak.. it’s probably one of many on the ‘net:

    Just use the ‘BSD colors’ and you’re set

  5. John Robinson says:

    Control+X does not work in my Mountain Lion? Got any other suggestions.

  6. koraz says:

    What do you mean ? Because it does work in nano.

  7. Dan says:

    This is one of your own, from 3 October 2011, and a favorite of mine:

    “If you want to customize the Terminals appearance a bit beyond the prompt and a custom background, you can make the Terminal much more readable by using this nice trick to add a separator and timestamp between each executed command. This also bolds the current command text and anything that is available from tab completion.”

  8. sudocvu says:

    Why not use iTerm2 and oh-my-zsh (

  9. Hoylen says:

    To change the colors in the PS1 prompt, change the text between the “\[033[” and the “m\]”. Nothing means reset to default; number means that color; number followed by “;1” means the bright or bold version of that color.

    31 – red
    32 – green
    33 – yellow
    34 – blue
    35 – magenta
    36 – cyan
    37 – white

    For example, “\[33[34;1m\]” is bold/bright blue.

    The special values (e.g. \u for the username, \h for the hostname, \w for the current working directory) are documented in the “PROMPTING” section of the bash man page.

    Don’t like the actual colors displayed (e.g. blue is hard to read on a black background)? Change them in Terminal’s preferences (under Settings and the profile being used.)

  10. Maicon Nunes says:

    The best tip is get rid of and use iTerm2. Anyone who uses shell professionally will tell you the same.

    • Frizlab says:

      I use Terminal everyday professionally and wouldn’t switch to anything else for all the gold of the world…
      You may prefer iTerm2, but let others have their own opinion.

    • Andrew says:

      I also feel no need to try iTerm2 now that has tabs.

    • fnordius says:

      iTerm2 is all right, but it does have some quirks that I personally find to be deal breakers. Apple’s own terminal does the trick for me. A little tweaking of the bash profile is the only really important part, as I also use the terminal built into IntellijIDEA/PHPStorm.

  11. jon says:

    Ever since I discovered the free Source Code Pro font, I’ve never used anything else for all my Terminal & plain text work.

    And the colors are pretty & convenient, but I prefer to go all green-on-black. Guess I’m just pining for my old Apple II+.

  12. Frizlab says:

    @Maicon Nunes
    I use Terminal everyday professionally and wouldn’t switch to anything else for all the gold of the world…
    You may prefer iTerm2, but let others have their own opinion.

  13. tito says:

    LOLO, do you really think the first screenshot is an improvement ? Or is the improvement visible after wearing sunglasses ?

  14. Daniel says:

    What exactly are the “command line colors” enabled by CLICOLOR?

  15. Andrew says:

    export HISTSIZE=5000
    export HISTFILESIZE=5000
    export HISTCONTROL=ignoredups
    export HISTTIMEFORMAT=’%F %T > ‘

    export GREP_COLOR=’1;32’

  16. Arpit says:

    How about switching to zsh? :)

  17. giuseppe says:

    how to revert to the original ?

  18. Andrew Rich says:

    Thanks for this article and useful comments! I put these into my ~/.profile – why would I use ~/.bash_profile instead?

    export PS1=”\[33[36m\]\u\[33[m\]@\[33[32m\]\h:\[33[33;1m\]\w\[33[m\]\$ ”
    export CLICOLOR=1
    export LSCOLORS=ExFxBxDxCxegedabagacad
    alias ls=ls\ -AFGhl
    export HISTIGNORE=”$HISTIGNORE:fortune:history”
    export HISTCONTROL=”ignoredups”
    export HISTTIMEFORMAT=”%F %T > ”
    export GREP_OPTIONS=”–color=auto”
    export GREP_COLOR=”1;32″

  19. Jinx says:

    I pasted in the color settings just as described in this article, and now every time I log in I see this:

    -bash: alias: -: not found
    -bash: alias: See: not found
    -bash: alias: more: not found
    -bash: alias: at:: not found
    -bash: alias: not found

    Any ideas how I can get rid of this?

  20. Sn says:

    could chnage the terminal from humm to aahh. Thanks!

  21. elias says:

    I keep trying these steps (plus similar posts, promoting the same colour options)..most people seem to be able to pull this off successfully..Control+X to save changes & code terminal window..never seems to work..oh wells
    got some colours going but nothing as shmcik as those above..
    osx 10.9.5

  22. Icebox says:

    Thanks for this. Learn something new every day on my MacBook Pro. Too bad we couldn’t have these UI choices in Yosemite preferences.

  23. thupker says:

    you can creat .profile as new file and paste what given above and it’s working perfectly fine

  24. Ajinkya says:

    Thanks, this even works for Yosemite :D

  25. Daniel says:

    Can I affect the same changes in Ubuntu?

  26. phoenix6142 says:

    Thank you very much. Worked like a charm. Great article!

  27. Andrea says:

    Can I change profile’s settings as text color and background of terminal by command line?

  28. fr33kill says:

    How will I change the colour of my command lines?

    $ git init

    I want git init to be of different colour. Is that possible?

  29. Idan says:

    How can I change “prompt” color with this solution?
    Currently it shows in black color.

    • Paul says:

      idan, you are looking to change the actual ANSI colors in use by Terminal application. I do this as well for certain color profiles because without doing so, certain things can be difficult to read with low contrast.

      The specific ANSI colors used can be set in the Terminal app preferences, go to Terminal > Preferences > Profiles > Text, then select the profile you are using, and adjust the “ANSI colors” section as you see fit. This screen shot may be helpful to refer to:

      In this case you are looking to change the black ANSI color for a specific profile to something with a bit more contrast, maybe a shade of grey will do or similar.

      Hope that helps!

  30. Ernie says:

    I changed my prompt, by copy/paste the above four lines into .bash_profile. Sometimes my prompt turns into this:


    I expect this format: “username@hostname:cwd $

    Any ideas how I can fix it or where I can look to find the problem?


  31. Emily says:

    Hi I changed the colors in my terminal but now I dont want colors anymore what should I do?

  32. Gahas says:

    what is the difference between .bash_profile and .profile?

  33. SG says:

    Two things this tutorial didn’t make clear that took me a long time to figure out:

    1. Between “ctrl o” to save and “ctrl x” to exit nano, you MUST hit enter.

    2. For your text color changes to still be the same when you open a new Terminal window, you MUST type: “source .bash_profile”.

    Using OS X High Sierra.

  34. Roshan says:

    I followed the steps mentioned above to change the command line color,

    but it gives an error as below.

    -bash: alias: Setting: not found
    -bash: alias: PATH: not found
    -bash: alias: for: not found
    -bash: alias: Python: not found
    -bash: alias: 3.6: not found
    roshan@Roshans-MacBook-Pro:~$ ls
    ls: illegal option — #
    usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file …]

  35. Andras says:

    Thanks for the tip it works well.
    Brings the usefulness of linux terminals to macOS.

    Just one more thing if it’s possible – how do I get ‘ls’ to display directories first [then executables] then the rest of the files?

    is there a
    –group-directories-first switch I could enable somehow?

  36. Kenji says:

    How do I change the color of the username only? I.e. I want to change “Kenjis-KBP:~kenji$” only so that it stands out against whatever commands I type following it.

    I’m using macOS High Sierra (v. 10.13.6) terminal.

    Your help much appreciated!


  37. Excellent, this really does brighten up a dull terminal. Works well on macOS Mojave.

Leave a Reply


Shop on and help support OSXDaily!

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Tips & Tricks


iPhone / iPad