The terminal emulator or simply the terminal is an integral part of any Linux distribution.
When you change the theme of your distribution, often the terminal also gets a makeover automatically. But that doesn’t mean you cannot customize the terminal further.
In fact, many It’s FOSS readers have asked us how come the terminal in our screenshots or videos look so cool, what fonts do we use, etc.
To answer this frequent question, I’ll show you some simple and some complex tweaks to change the appearance of the terminal. You can compare the visual difference in the image below:
Customizing Linux Terminal
This tutorial utilizes a GNOME terminal on Pop!_OS to customize and tweak the look of the terminal. But, most of the advice should be applicable to other terminals as well.
For most of the elements like color, transparency, and fonts, you can utilize the GUI to tweak it without requiring to enter any special commands.
Open your terminal. In the top right corner, look for the hamburger menu. In here, click on “Preferences” as shown in the screenshot below:
This is where you’ll find all the settings to change the appearance of the terminal.
Tip 0: Use separate terminal profiles for your customization
I would advise you to create a new profile for your customization. Why? Because this way, your changes won’t impact the main terminal profile. Suppose you make some weird change and cannot recall the default value? Profiles help separate the customization.
As you can see, Abhishek has separate profiles for taking screenshots and making videos.
You can easily change the terminal profiles and open a new terminal window with the new profile.
That was the suggestion I wanted to put forward. Now, let’s see those tweaks.
Tip 1: Use a dark/light terminal theme
You may change the system theme and the terminal theme gets changed. Apart from that, you may switch between the dark theme or light theme, if you do not want to change the system theme.
Once you head in to the preferences, you will notice the general options to change the theme and other settings.
Tip 2: Change the font and size
Select the profile that you want to customize. Now you’ll get the option to customize the text appearance, font size, font style, spacing, cursor shape, and toggle the terminal bell sound as well.
For the fonts, you can only change to what’s available on your system. If you want something different, download and install the font on your Linux system first.
One more thing! Use monospaced fonts otherwise fonts might overlap and the text may not be clearly readable. If you want suggestions, go with Share Tech Mono (open source) or Larabiefont (not open source).
Under the Text tab, select Custom font and then change the font and its size (if required).
Tip 3: Change the color pallet and transparency
Apart from the text and spacing, you can access the “Colors” tab and change the color of the text and background of your terminal. You can also adjust the transparency to make it look even cool.
As you can notice, you can change the color palette from a set of pre-configured options or tweak it yourself.
If you want to enable transparency just like I did, you click on “Use transparent background” option.
You can also choose to use colors from your system theme, if you want a similar color setting with your theme.
Tip 4: Tweaking the bash prompt variables
Usually, you will see your username along with the hostname (your distribution) as the bash prompt when launching the terminal without any changes.
For instance, it would be “ankushdas@pop-os:~$” in my case. However, I permanently changed the hostname to “itsfoss“, so now it looks like:
To change the hostname, you can type in:
However, this will be applicable only for the current sessions. So, when you restart, it will revert to the default. To permanently change the hostname, you need to type in:
sudo hostnamectl set-hostname CUSTOM_NAME
Similarly, you can also change your username, but it requires some additional configuration that includes killing all the current processes associated with the active username, so we’ll avoid it to change the look/feel of the terminal.
Tip 5: NOT RECOMMENDED: Changing the font and color of the bash prompt (for advanced users)
However, you can tweak the font and color of the bash prompt (ankushdas@itsfoss:~$) using commands.
You will need to utilize the PS1 environment variable which controls what is being displayed as the prompt. You can learn more about it in the man page.
For instance, when you type in:
The output in my case is: