How to make your MAC-OS shell look pretty

If you are from the Linux world or maybe familiar with the Ubuntu shell (or any other distro you prefer) like me, then you would find the Mac OS shell quite dull. It is pretty much black text on a white background by default and that is not always nice when executing commands or when spending some time in the shell. For example , when you run the “ls” command you would like to see the highlighting in differences between files and directories, or read-only and executable files. This functionality is default in Linux but in Mac …….. well……. not so much.

I will explain in some detail in this post how to make your Mac shell a tad more nicer with some colouring via some screenshots taken on my Development box.

(Note: to take screenshots on MAC you can use the following commands :

  • Command-Shift-3: Take a screenshot of the screen, and save it as a file your desktop
  • Command-Shift-4, then select an area to capture and save it to the desktop
  • Command-Shift-4, then space, then click a window and save it to the desktop
  • Command-Control-Shift-3: Take a screenshot of the screen, and save it to the clipboard
  • Command-Control-Shift-4, then select an area and save it to the clipboard
  • Command-Control-Shift-4, then space, then click a window and save it to the clipboard )
  • We first need to open up a terminal and then type in the command to open up the profile file (Very important that if this file does not exist you would have to create it in the root of your home folder). This is done by executing the command “edit ~/.profile”
  • Screen shot 2011-08-12 at 11.03.06 AM

  • You can then add the following exports as depicted in the image below to add colouring to the commands of your terminal for your profile.       Screen shot 2011-08-12 at 11.03.33 AM
  • You can then close your terminal, and open up a new instance.
  • Then run the following command “ls” to see the colouring magic applied on your terminal.
  • This is GREAT, but we are still stuck with the burning white as a background in the terminal. To change this you need to click on the preferences of the terminal once a terminal is open.Screen shot 2011-08-12 at 11.07.35 AM
  • When presented with the preference screen , you can select your theme (mine is set to homebrew) and set that as default.Screen shot 2011-08-12 at 11.08.12 AM
  • Then close your terminal , and open up a new instance.
  • You will then see the colours has changed, and when you run the “ls” command you will see the colouring on terminal commands as well. Screen shot 2011-08-12 at 11.09.00 AM

That’s it for changing your shell to look similar to the Linux one. Have fun , and let me know if you struggle.

 

NOTE: If my images look funny that’s because I blocked out the computer and user name from the shell with the red block, so yours will definitely look different there. Smile

Advertisements