How to customize your Mac terminal

If you spend time in Mac Terminal, you may want to customize the look of the app. The good news is that there are many ways to customize your Mac terminal to be more productive and efficient.

In this article, we’ll show you some great ways to customize your Mac’s terminal windows.

Fine-tune the main theme

The terminal has a built-in ability to customize shell windows, although you may not notice it at first glance. To do this, go to the Device Settings screen.

From there, select the Profiles tab. This section allows you to adjust the appearance of the terminal window.

You can change the background and text color, text rendering options, font sizes and fonts, cursor type, selection color, and ANSI colors. The latter is used when the Terminal command displays a colored result but does not display otherwise.

You will notice several profiles in the left menu. You can select one of them or create a new custom profile by clicking the + icon at the bottom of the screen. Profiles are settings repositories, so you may want to create a personal profile before changing anything.

When you are finished, click the Default button to set a new main profile. All new terminal windows will now open with this profile.

You can also open the terminal windows of a specific profile from “Shell -> New Window”, where you can also select a profile.

You can also import profiles to the terminal from the menu at the bottom of the Profiles pane.

See also  Mark a folder in the Mac Finder

This allows you to align your terminal experience profile with other versions in different applications. For example, a Vim editor, a terminal, and a Slack application may have the same profile and theme.

Connection commands

The terminal can execute certain commands when the shell window is open. You can configure them by profile so that different profiles execute individual commands.

To do this, click the Shell tab in the Profiles dialog box.

Under Startup, select the Run Command check box, and then type the command that you want to run, but leave the Run in shell check box here.

This setting is automatically saved to the associated profile and is executed the next time you open the shell with that profile. To disable the startup command, clear the Run command check box.

Color the invitation

By editing the “.Zshrc” file, you can color the text of the terminal prompt. This is the solid text that appears in the shell window.

To get started, open the .zshrc file in the nanoeditor with the following command:

Add a new line from the editor PROMPT=. Your ANSI color code and fast style will follow. The full code we have is:

To break down our example, we have incorporated style %F and %f Note that we use color and then add a color name between the braces {cyan}. It can also be a a number between 0 and 256.

From there, we gave a quick style:

  • Show username (%n)
  • Shows the path of the current working directory without the home directory (%1~)
  • Set to show a pound sign if the user is an administrator, or a percentage sign (%#)

You can do much more here, and the process is easier than using bash profiles, as in previous versions of Terminal.

See also  How to cut costs by upgrading your old Mac rather than buying a new Mac

Color and shape the terminal

You can also format text written to the terminal with profile settings or command commands directly from the prompt.

Assign a text color to a profile using the text color setting on the “Profiles -> Text” screen of the terminal.

To color the text temporarily, enclose the text in quotation marks and use printf Order:

Décomposons ceci :

  • e échappe les caractères non imprimables
  • [31m est le code couleur du texte rouge
  • Hello World est notre chaîne littérale
  • e[0m efface la mise en forme afin que le nouveau texte n’apparaisse pas colorisé
  • n imprime une nouvelle ligne

Si vous souhaitez que le texte continue d’apparaître en couleur, laissez le champ e[0m . Pour terminer le formatage, imprimez e[0m à la sortie standard avec printf.

Vous pouvez également utiliser les mêmes codes ANSI que précédemment et accéder à plus grande profondeur quand il s’agit de la mise en forme de votre invite.

Changer le titre de la fenêtre du terminal

Par défaut, Terminal affichera le répertoire de travail actuel, le processus actif et la taille de la fenêtre d’affichage dans la barre de titre de votre fenêtre Terminal.

Vous pouvez changer cela à partir de l’onglet « Profil -> Fenêtre » des Préférences du Terminal.

You can adjust the settings in the Title section and see the results in all open shell windows with your current profile. The same general settings can also be found on the tabs screen if you want to copy the settings to multiple open tabs.

See also  The best Apple Arcade games that also work on MacOS


Making the terminal your own is a great way to personalize your experience and become more efficient and productive. In fact, you can do a lot more to customize your Mac terminal, and this article has the biggest hits.

With a terminal tailored to your specific needs, you can access your entire computer from Terminal or even upgrade from Mac Terminal. Do you use Terminal more if you can customize it? Tell us in the comments section below!

About the author


Leave a Comment