# Setting colors in your terminal If you spend most of your day staring into a terminal, or you want to start to work that way, then it's only natural that you would want your terminal 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 chances are good that your software terminal window has plenty of options to theme what you see, no matter how you define "beauty". ## Settings Most popular software terminal applications ship with the option to change color themes. If you're using GNOME, KDE, or XFCE, then this is true for your default terminal application. Adjusting your theme is as easy as adjusting application preferences. Because it ships with Fedora, RHEL, and Ubuntu by default, this article uses GNOME terminal as an 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, this is reached 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](gnome-terminal-prefences.jpg) In the **Colors** tab, deselect the **Use colors from system theme** option so that the rest of the window is 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) is overriding them. The **Palette** sets the colors as 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](https://opensource.com/article/19/7/master-ls-command) command. If any of them don't appeal to you, change them here. 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](gnome-terminal-profile-select.jpg) ## Command options If your terminal of choice doesn't feature a fancy settings window, it may provide options for colors to your launch command. The terminals ``xterm`` and ``rxvt`` (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 the dependencies on 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 ANSI number: ``` $ urxvt -bg black -fg green ``` These settings actually set the default foreground and background. Should any other rule govern the color of a specific file or device type, then 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 ``` ![](urxvt-color.jpg) Your terminal emulator of choice 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 applied, you can either add the options to the command or 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; 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 what better to start with than the terminal!