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:
mkdir -p ~/.local/share/fonts
cp ~/Downloads/*.ttf ~/.local/share/fonts/
fc-cache -f -vUse 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:
/home/golinuxcloud/.cache/fontconfig: cleaning cache directory
fc-cache: succeededInstall 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.
mkdir -p ~/.local/share/fonts/my-fonts
cp ~/Downloads/my-font/*.ttf ~/.local/share/fonts/my-fonts/
fc-cache -f -vUse 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:
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:
sudo apt install fonts-firacode # Debian / Ubuntu
sudo dnf install google-noto-sans-fonts # Fedora / RHEL
sudo pacman -S noto-fonts # ArchUse 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:
fc-cache -f -vList fonts and filter by name:
fc-list | grep -i "dejavu"Example line from a typical system:
/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf: DejaVu Sans:style=BookCheck which file Fontconfig would choose for a family name:
fc-match "DejaVu Sans"Example:
DejaVuSans.ttf: "DejaVu Sans" "Book"Remove a font you installed for the current user:
rm -rf ~/.local/share/fonts/my-fonts
fc-cache -f -vRemove a system-wide font you copied manually:
sudo rm -rf /usr/local/share/fonts/my-fonts
sudo fc-cache -f -vIf 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.

