Install Fonts in Linux

Learn how to install fonts in Linux using the command line and GUI. Install TTF and OTF fonts for the current user or system-wide, update font cache, verify with fc-list, and uninstall fonts.

Published

Updated

Read time 4 min read

Reviewed byDeepak Prasad

Install Fonts in Linux

You can install fonts in Linux by copying .ttf or .otf files into a fonts directory and refreshing the font cache with fc-cache. This guide walks through user installs (no sudo), system-wide installs, package-manager fonts, verification commands, removal, and short GUI steps for GNOME and KDE.

Tested on: fontconfig 2.15.0; kernel 6.14.0-37-generic; Ubuntu 25.04.


Install fonts in Linux from command line

To install a font in Linux, copy the .ttf or .otf file to a fonts directory and rebuild the font cache using fc-cache. For a single user, use ~/.local/share/fonts/. For all users, use /usr/local/share/fonts/ or /usr/share/fonts/.

Quick method on Ubuntu and most desktop Linux distributions:

bash
mkdir -p ~/.local/share/fonts
cp ~/Downloads/*.ttf ~/.local/share/fonts/
fc-cache -f -v

Use the same steps for .otf files—copy *.otf instead of *.ttf. You can mix both formats in the same directory.

Example output when the cache rebuild succeeds:

text
/home/golinuxcloud/.cache/fontconfig: cleaning cache directory
fc-cache: succeeded

Install fonts for current user

Installing fonts under your home directory is the safest default: you do not need sudo, and the change affects only your account.

bash
mkdir -p ~/.local/share/fonts/my-fonts
cp ~/Downloads/my-font/*.ttf ~/.local/share/fonts/my-fonts/
fc-cache -f -v

Use this method for desktop users, personal fonts, downloaded fonts, and cases where you do not want to modify system directories. A subdirectory such as my-fonts/ keeps families grouped and easy to remove later.

Some older systems also use ~/.fonts, but ~/.local/share/fonts/ is the better modern location and matches the XDG base directory layout.


Install fonts system-wide

Use a system-wide install when every user on the machine should see the font. Prefer /usr/local/share/fonts/ for fonts you add manually:

bash
sudo mkdir -p /usr/local/share/fonts/my-fonts
sudo cp ~/Downloads/my-font/*.ttf /usr/local/share/fonts/my-fonts/
sudo fc-cache -f -v

/usr/share/fonts/ is commonly managed by distribution packages. Putting custom files under /usr/local/share/fonts/ avoids mixing your fonts with package updates and makes removal straightforward.


Install fonts using package manager

When a font is packaged for your distribution, install it with the package manager so updates and removal stay clean:

bash
sudo apt install fonts-firacode          # Debian / Ubuntu
sudo dnf install google-noto-sans-fonts  # Fedora / RHEL
sudo pacman -S noto-fonts                # Arch

Use package-manager fonts when available because they are easier to update and remove than copying files by hand.


Verify, refresh, and remove fonts

Rebuild the cache after any install or removal:

bash
fc-cache -f -v

List fonts and filter by name:

bash
fc-list | grep -i "dejavu"

Example line from a typical system:

text
/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf: DejaVu Sans:style=Book

Check which file Fontconfig would choose for a family name:

bash
fc-match "DejaVu Sans"

Example:

text
DejaVuSans.ttf: "DejaVu Sans" "Book"

Remove a font you installed for the current user:

bash
rm -rf ~/.local/share/fonts/my-fonts
fc-cache -f -v

Remove a system-wide font you copied manually:

bash
sudo rm -rf /usr/local/share/fonts/my-fonts
sudo fc-cache -f -v

If an application was already open when you installed the font, restart that application (or log out and back in) so it rescans available fonts.


Install fonts using GUI

CLI installs are usually faster for downloaded .ttf / .otf bundles. Use the desktop when you prefer clicking through an installer.

GNOME: open the font file in the default font viewer, or open the Fonts app from the application menu, then click Install for fonts that are not already installed.

KDE: open Font Management (System Settings → Fonts, or the standalone Font Management app), click Add, select your font files, and choose Personal (user) or System (all users).

Font Manager (font-manager on many Ubuntu-based systems) is another option if you want a dedicated GUI to preview, enable, and remove fonts without using the terminal.


Summary

To install fonts in Linux from the command line, copy .ttf or .otf files into ~/.local/share/fonts/ for your user or /usr/local/share/fonts/ for all users, then run fc-cache -f -v. Verify with fc-list and fc-match, remove the font directory when you no longer need the family, and refresh the cache again. Use your package manager when the font is available as a distro package. GNOME, KDE, and Font Manager offer GUI installs when you prefer not to use the terminal; restart open applications if a new font does not appear immediately.


Frequently Asked Questions

1. Where do I install fonts for only my user on Linux?

Copy .ttf or .otf files into ~/.local/share/fonts/ (optionally in a subdirectory), then run fc-cache -f -v. No sudo is required.

2. What is the Ubuntu install fonts command line quick method?

mkdir -p ~/.local/share/fonts, copy your .ttf or .otf files there, then run fc-cache -f -v. Use fc-list or fc-match to confirm the font is visible.

3. How do I install fonts system-wide on Linux?

Copy fonts into /usr/local/share/fonts/ with sudo, run sudo fc-cache -f -v, and verify with fc-list. Prefer /usr/local/share/fonts/ for manual installs instead of /usr/share/fonts/, which package managers usually own.

4. Why is my new font not showing in an open application?

Fontconfig picks up new files after fc-cache, but programs that were already running often need a restart before they list the new font.

References

Omer Cakmak

Linux Administrator

Highly skilled at managing Debian, Ubuntu, CentOS, Oracle Linux, and Red Hat servers. Proficient in bash scripting, Ansible, and AWX central server management, he handles server operations on …