The Terminal is an important part of Mac OS X, as you can use it for various purposes, like hiding files and folders, forcing non responding applications to quit or moving files to cloud storage and FTP servers. However, in this guide we will not be talking about allt the functions of the Terminal, instead, we will be discussing its appearance and the ways of changing it. By default, your Mac's Terminal comes with a plain white background and black text that might seem boring at some point. If you wish to customize it, then you should known that there are several ways to do it. Read the following guide and find out how to customize the OS X Terminal.
The first method of changing the way your Terminal looks like is editing the .bash_profile. This gives you the possibility to modify the bash prompt, enable colors and customize the output of the frequently used "ls" command. To do that, you need to write several commands.
Firstly, open the Terminal and type the command below to start editing .bash_profile:
Once you have done that, type (or paste) the following lines: (I suggest using this for light Terminal themes)
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "
alias ls='ls -GFh'
The first line modifies the coloring of the bash prompt and will make it (the prompt) look like "username@hostname:cwd $". The second line, "export CLICOLOR=1" is used for enabling the command-line colors and the third one, "export LSCOLORS=<color code>" defines the colors used for the "ls" command. However, if you are not happy with the colors after typing these commands, you can change them by switching the string "ExFxBxDxCxegedabagacad" to any desired color pattern (you can easily Google a couple of these). For example, you can replace the string to "GxFxCxDxBxegedabagaced" for dark Terminal themes.
And the last, but not least, the "alias ls" command will. This one will add several flags to the "ls" command: "-G" will make the output colorized, "-F" appends symbols after directories, executable files and links for an easier identification and "-h" will resize the text, making it more readable.
After typing or pasting the commands, simply press Control+O to save the changes and then Control+X to exit the editing mode (nano).
Access the "Profile" option to change theme
Editing the .bash_profile will let you change the colors and the display mode of the Terminal's prompt and various commands, but the "Profile" options under Terminal's "Preferences" will let you change the theme, background image, text coloring and more.
First of all, open the "Profile" window. To do that, simply launch the Terminal, click on the the "Preferences" menu and select the "Profiles" tab (or "Settings", depending on the version of your Mac OS).
On the left side, you will notice a list of all available themes to choose from; each theme has itsr own background image, color scheme and fonts. If you want, you can even change the default ANSI colors, along with cursor types, fonts and backgrounds of each theme.
But there is more. If you don't like any of the provided themes, you can easily make your own one by pressing the "+" button on the bottom-left side of the "Profiles' tab. Now, you can select any font you want for the text, its color and behavior (like blinking text, making it bold and so on), cursor styles and more with just a few clicks of a mouse. Selecting the colors for your Terminal is a very simple process; all you have to do is click on a color (ANSI, test or background color) to open the color picker (see image) and choose the one you want.
As you might have noticed, there are also other tabs under the "Profiles" window. While the "Text" tab allows you to change the font, colors and cursor styles of your Terminal, the "Window" tab provides you with several other customization options.
Here you can change the title that will be displayd on the Terminal's top bar, add a desired background image with various effects (such as transparency) and even change the default size of Terminal's window. It is pretty straightforward, so you should have no problems making any modifications to your theme.
Moreover, there are three additional selectable tabs that do not affect Terminal's appearance, but might prove to be useful for other purposes. The "Shell" tab will let you add a command to run on startup or choose what to do when the shell exists, the "Keyboard" tab allows you to set hotkeys for various actions which you can edit with a simple double-click and the "Advanced" tab that contains various options that cannot be grouped with other settings.
You might also want to know that clicking on the "General" tab (the one before the "Profiles" tab) will let you select the way the new Terminal windows open and assign it to one of the profiles (see the image).
All in all, changing your Terminal's appearance and behavior is not that difficult. Keep in mind that, if you don't like any of the provided themes and you don't want to or don't have time to make your own theme, you can always download on GitHub or other resources.
If you have any questions or suggestions, feel free to leave us a comment in the section below.