Change your Linux terminal color theme

Your terminal has plenty of options that allow you to theme what you see.
154 readers like this.

If you spend most of your day staring into a terminal, it's only natural that you want it to look pleasing. Beauty is in the eye of the beholder, and terminals have come a long way since the days of CRT serial consoles. So, the chances are good that your software terminal window has plenty of options to theme what you see—however you define beauty.

Settings

Most popular software terminal applications, including GNOME, KDE, and Xfce, ship with the option to change their color theme. Adjusting your theme is as easy as adjusting application preferences. Fedora, RHEL, and Ubuntu ship with GNOME by default, so this article uses that terminal as its example, but the process is similar for Konsole, Xfce terminal, and many others.

First, navigate to the application's Preferences or Settings panel. In GNOME terminal, you reach it through the Application menu along the top of the screen or in the right corner of the window.

In Preferences, click the plus symbol (+) next to Profiles to create a new theme profile. In your new profile, click the Colors tab.

GNOME Terminal preferences

In the Colors tab, deselect the Use Colors From System Theme option so that the rest of the window will become active. As a starting point, you can select a built-in color scheme. These include light themes, with bright backgrounds and dark foreground text, as well as dark themes, with dark backgrounds and light foreground text.

The Default Color swatches define both the foreground and background colors when no other setting (such as settings from the dircolors command) overrides them. The Palette sets the colors defined by the dircolors command. These colors are used by your terminal, in the form of the LS_COLORS environment variable, to add color to the output of the ls command. If none of them appeal to you, change them on this screen.

When you're happy with your theme, close the Preferences window.

To change your terminal to your new profile, click on the Application menu, and select Profile. Choose your new profile and enjoy your custom theme.

GNOME Terminal profile selection

Command options

If your terminal doesn't have a fancy settings window, it may still provide options for colors in your launch command. The xterm and rxvt terminals (the old one and the Unicode-enabled variant, sometimes called urxvt or rxvt-unicode) provide such options, so you can still theme your terminal emulator—even without desktop environments and big GUI frameworks.

The two obvious options are the foreground and background colors, defined by -fg and -bg, respectively. The argument for each option is the color name rather than its ANSI number. For example:

$ urxvt -bg black -fg green 

These settings set the default foreground and background. Should any other rule govern the color of a specific file or device type, those colors are used. See the dircolors command for information on how to set those.

You can also set the color of the text cursor (not the mouse cursor) with -cr:

$ urxvt -bg black -fg green -cr teal

Setting color in urxvt

Your terminal emulator may have more options, like a border color (-bd in rxvt), cursor blink (-bc and +bc in urxvt), and even background transparency. Refer to your terminal's man page to find out what cool features are available.

To launch your terminal with your choice of colors, you can add the options either to the command or the menu you use to launch the terminal (such as your Fluxbox menu file, a .desktop file in $HOME/.local/share/applications, or similar). Alternatively, you can use the xrdb tool to manage X-related resources (but that's out of scope for this article).

Home is where the customization is

Customizing your Linux machine doesn't mean you have to learn how to program. You can and should make small but meaningful changes to make your digital home feel that much more comfortable. And there's no better place to start than the terminal!

Seth Kenlon
Seth Kenlon is a UNIX geek, free culture advocate, independent multimedia artist, and D&D nerd. He has worked in the film and computing industry, often at the same time.

Comments are closed.

Creative Commons LicenseThis work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.