How to Install New (or Nerd) Fonts on Linux (Ultimate Guide)

Linux TLDR
Last Updated:
Reading time: 5 minutes

A good font (also referred to as typography) is crucial in UI/UX design. However, individuals interested in desktop customization often enjoy having an amazing font of their choice on their system to make it stand out among others.

While users are provided with a variety of fonts to choose from for their system, if you want to install a new font from the internet, then the steps for Windows are quite easy, whereas for Linux, they are a little different.

In this article, I’ll guide you through various methods to install modern, new fonts on your Linux system for an enhanced desktop experience, including Nerd Fonts for your terminal emulator.

How to Install New Fonts on Linux

The Linux system includes numerous pre-installed fonts, giving users the option to choose from them. However, if your desired font is unavailable, you can typically download it in TrueType (TTF) or OpenType (OTF) file formats. So, let’s begin with…

Downloading Fonts from the Internet

There are multiple sources from which you can download your favorite font for free; the most recommended ones are listed below.

For instance, I’ll download my favorite β€œInter” font from Google Fonts, as shown.

downloading new fonts from google fonts

Installing Single Fonts at a Time

The downloaded font file will typically be compressed in zip format, so navigate to the downloaded directory and extract the fonts (for me, it’s β€œInter.zipβ€œ) from your file manager.

uncompressing font file from desktop manager

Alternatively, you can also run the following unzip command to extract the font file:

$ unzip

Now, proceed to the extracted directory, where you will discover multiple files. Look for .ttf (TrueType Fonts) or .otf (OpenType Fonts) files.

locating font files

Upon finding either of them, open the file; this action will launch the font manager, where you need to click on the β€œinstall” button located in the top-right corner.

install new font

Wait for a moment until the green β€œInstall” button turns into a gray β€œInstalled” button.

new font installed

Alternatively, you can also install your new font from the command line in Linux by moving the .ttf or .otf files to the β€œ~/.local/share/fonts/” directory.

$ sudo cp *.ttf  ~/.local/share/fonts/


install new font from command-line

Once installed, you can choose your newly installed font in your favorite applications that offer font selection options, such as Gedit, GIMP, Pinta, etc.

using the new font

Installing Multiple Fonts at Once

Imagine having 50+ fonts to install. With a graphical method, it can become quite tedious, so in this case, you can use the command-line method to install all your desired fonts at once.

To demonstrate, here are a few fonts I’ve already downloaded from Google Fonts and extracted using the method previously demonstrated in this article.

directory with fonts

In the image above, you can observe that I’ve removed all unnecessary files except .ttf (retain .otf if it exists) and moved them to a single location.

To install all of them at once, you can either move all of these files to the β€œ~/.local/share/fonts/” directory from your file manager or use the following command:

$ sudo mv * ~/.local/share/fonts/


install multiple fonts at once

Installing New Fonts using Font Manager (GUI)

All the above-mentioned methods require multiple steps to install your favorite fonts on Linux; however, this tedious process can be simplified with a tool called a font manager.

The Font Manager is a popular open-source GUI application for managing fonts on your Linux system, allowing you to easily install single or multiple fonts at once or delete your existing ones.

To start, execute any one of the following commands to install the font manager on Linux:

#For Debian, Ubuntu, Linux Mint, etc.
$ sudo apt install font-manager

#For RHEL, Fedora, Alma Linux, etc.
$ sudo dnf copr enable jerrycasiano/FontManager
$ sudo dnf install font-manager

#For Arch, Manjaro, EndeavourOS, etc.
$ sudo pacman -S font-manager

Once the installation is complete, you can find it in your application menu and launch it from there.

font manager app

When you launch it for the first time, the home window interface will resemble the one below.

font manager

The application is quite self-explanatory, but I’ve highlighted the important options, so here is an explanation of each of them.

  1. List all installed fonts on your Linux system.
  2. Add and install local fonts.
  3. Remove selected fonts.
  4. List all Google Fonts from which you discover and install new fonts.

For instance, to install a new font from Google Fonts, simply click the highlighted β€œG” with β€œ4β€œ, locate your favorite font, and click on the β€œDownload family” button to install.

install new font from font manager

If you wish to remove this tool from your system, simply execute one of the following commands based on your Linux system:

$ sudo apt remove font-manager                                                #For Debian, Ubuntu, Linux Mint, etc.
$ sudo dnf remove font-manager                                                #For RHEL, Fedora, Alma Linux, etc.
$ sudo pacman -R font-manager                                                 #For Arch, Manjaro, EndeavourOS, etc.

What are Nerd Fonts for Linux?

Nerd Fonts is a collection of patched fonts that includes a bunch of patched (glyphs) icons to make it compatible with a variety of command-line tools, programming, and scripting languages.

The glyphs (or icons) are chosen from popular fonts such as Font Awesome, Devicons, Font Logos, Material Design Icons, Powerline Symbols, Octicons, Weather Icons, and many others.

As of writing this article, there are currently 50+ nerd fonts, with popular ones like β€œHackβ€œ, β€œFira Codeβ€œ, β€œDejaVuβ€œ, and β€œDroidSans” being considered the best and most ready-to-use fonts.

So, let’s see how you can install new Nerd Fonts on your Linux system with multiple methods.

Installing Nerd Fonts on Linux

To do so, locate and download a new nerd font from the patched fonts directory, or use the following command to download my favorite β€œDejaVu” nerd font using the wget command.

$ wget

To perform a user-specific installation, ensure that the β€œ~/.local/share/fonts/” directory exists. Next, unzip the compressed nerd font content into the fonts directory, and finally, refresh the font cache by executing the β€œfc-cache -f -v” command.

$ mkdir -p ~/.local/share/fonts/
$ unzip -d ~/.local/share/fonts/DejaVuSansMono
$ fc-cache -f -v

To perform a system-level installation, just decompress the Nerd Font content into the β€œ/usr/share/fonts/” directory, then refresh your font cache by executing the β€œsudo fc-cache -f -v” command.

$ sudo unzip -d /usr/share/fonts/DejaVuSansMono
$ sudo fc-cache -f -v

Once completed, use your new Nerd Font in your preferred application (for instance, gnome-terminal) by navigating to settings and selecting β€œDejaVu Sans Mono” as your new font.

install nerd font in gnome terminal

Installing Nerd Fonts using getNF

The previous method involved multiple steps that can be eliminated with the getNF command-line tool, an amazing tool that simplifies the process of installing new Nerd fonts.

To install, simply execute the following command on your Linux system:

$ curl -fsSL | bash

Make sure that β€œ~/.local/bin” is included in your $PATH environment variable, or insert the following line into your default login shell profile, such as ~/.bashrc or ~/.bash_profile for Bash, to persist the changes.

export PATH="$HOME/.local/bin:$PATH"

Finally, execute the following command to launch the getNF command-line interface:

$ getnf


getNF command-line interface

To install your desired Nerd Font (assuming β€œHackβ€œ), simply enter the specific number (in this case, β€œ26β€œ) in front of your desired Nerd Font.

installing nerd font using getnf

This allows you to effortlessly install your preferred Nerd font without the need to manually visit, download, unzip, install, and refresh the font cache each time you want to install a new Nerd font.

Final Word

I hope you find this article useful. If you have any questions or queries related to the article, feel free to ask them in the comment section.

Till then, peace!

Join The Conversation

Users are always welcome to leave comments about the articles, whether they are questions, comments, constructive criticism, old information, or notices of typos. Please keep in mind that all comments are moderated according to our comment policy.

3 thoughts on β€œHow to Install New (or Nerd) Fonts on Linux (Ultimate Guide)”

  1. getNF is so cool. I often find installing nerd fonts a complex and challenging task, and it makes it totally easy. Thanks for the article, Linux TLDR!