How to Install Fonts on Linux
Install fonts on Linux for a single user or system-wide, understand fontconfig's directory layout, and refresh the font cache so apps pick them up immediately.
Before you start
- ▸A Linux desktop environment (GNOME, KDE, XFCE, or similar)
- ▸fontconfig installed (present by default on all major desktop distros)
- ▸Font files in .ttf or .otf format ready to install
Linux font management is simpler than most people expect. You can install fonts for your user account alone without touching system directories, or deploy them system-wide for every user. Either way, the tool doing the heavy lifting is fontconfig, which discovers, catalogs, and serves fonts to applications. This guide covers both scopes, explains the directory layout, and shows you how to force applications to pick up new fonts immediately.
Understanding Font Scope: User vs System
Linux has two font installation targets:
- User fonts — live in
~/.local/share/fonts/(the modern XDG path). Only your account can see them. No root needed. This is the right choice for personal font collections. - System fonts — live in
/usr/local/share/fonts/for manually installed fonts, or/usr/share/fonts/for package-managed ones. Every user on the machine sees them. Requires root.
Prefer user-scope installs unless you have a specific reason to go system-wide. Package-managed fonts (installed via apt, dnf, or pacman) always go to /usr/share/fonts/ and are handled automatically.
Step 1: Install Fonts via the Package Manager
For common font families, your package manager is the fastest path. The cache is updated automatically as part of the package post-install script.
Debian / Ubuntu
sudo apt install fonts-noto fonts-liberation fonts-firacode
Fedora / RHEL / Rocky
sudo dnf install google-noto-fonts-common liberation-fonts fira-code-fonts
Arch Linux
sudo pacman -S noto-fonts ttf-liberation ttf-fira-code
Search your package manager first — popular families like Noto, Liberation, DejaVu, and many Google Fonts are already packaged. You get clean uninstall support as a bonus.
Step 2: Install Fonts Manually (User Scope)
Downloaded a .ttf, .otf, or .woff2 file? Install it for your user account in three commands. Note that .woff and .woff2 files are web formats; most desktop applications only use .ttf and .otf.
mkdir -p ~/.local/share/fonts/MyFonts
cp ~/Downloads/CoolFont-Regular.ttf ~/.local/share/fonts/MyFonts/
fc-cache -f -v ~/.local/share/fonts
The -f flag forces a full rescan even if the timestamp hasn't changed. -v prints each directory it processes so you can confirm your folder was picked up. Output will vary but should include a line referencing ~/.local/share/fonts/MyFonts.
Organising fonts into subdirectories (e.g., MyFonts/, Monospace/) is optional but keeps things tidy. Fontconfig scans recursively.
Step 3: Install Fonts Manually (System-Wide)
Use /usr/local/share/fonts/ for manually installed system fonts. Never drop files directly into /usr/share/fonts/; that directory is owned by the package manager and your files may be removed on updates.
sudo mkdir -p /usr/local/share/fonts/MyFonts
sudo cp ~/Downloads/CoolFont-Regular.ttf /usr/local/share/fonts/MyFonts/
sudo fc-cache -f -v /usr/local/share/fonts
Set sane permissions so all users can read the files:
sudo chmod 644 /usr/local/share/fonts/MyFonts/*.ttf
sudo chmod 755 /usr/local/share/fonts/MyFonts
Step 4: Refresh the Font Cache
Fontconfig maintains a binary cache in ~/.cache/fontconfig/ (user) and /var/cache/fontconfig/ (system). Most GUI applications read this cache on startup rather than scanning font directories each time.
Rebuild the cache for your user:
fc-cache -f
Rebuild the system-wide cache (after a system-scope install):
sudo fc-cache -f -s
The -s flag tells fc-cache to scan system directories instead of user directories. Running both together is harmless.
After rebuilding, running applications need to be restarted to pick up new fonts. Browsers, LibreOffice, and GNOME apps all cache the font list in-process. A full logout/login is the safest way to ensure everything refreshes, but simply restarting the specific application usually works.
Step 5: Verify the Font Is Recognised
Use fc-list to confirm fontconfig can see your new font. The command searches across all configured font directories.
fc-list | grep -i "CoolFont"
A successful result looks like:
/home/user/.local/share/fonts/MyFonts/CoolFont-Regular.ttf: CoolFont:style=Regular
You can also query by family name to see every installed variant:
fc-list : family | sort | grep -i "noto"
If fc-list finds the font but an application doesn't show it, restart that application. If it still doesn't appear, the app may use its own font discovery (some Electron apps, for example) or may not support the font format.
How Fontconfig Works
Fontconfig reads a set of configuration files, starting from /etc/fonts/fonts.conf. That file references /etc/fonts/conf.d/, which contains drop-in snippets for things like hinting, anti-aliasing, and font substitution rules. You should rarely need to edit these directly.
The directories fontconfig scans by default include:
/usr/share/fonts//usr/local/share/fonts/~/.local/share/fonts/(XDG standard, preferred)~/.fonts/(legacy, still supported but deprecated)
If you put fonts in ~/.fonts/ out of habit, they will still work, but migrate them to ~/.local/share/fonts/ to stay current with the XDG Base Directory Specification.
To see every directory fontconfig is currently configured to scan:
fc-config --list-dirs
Installing Font Families from Archives
Google Fonts and many commercial foundries distribute fonts as ZIP archives containing multiple weights. Here's an efficient way to handle them:
cd ~/Downloads
unzip 'Inter.zip' -d inter-extracted
mkdir -p ~/.local/share/fonts/Inter
find inter-extracted -name '*.ttf' -o -name '*.otf' | xargs cp -t ~/.local/share/fonts/Inter/
fc-cache -f
Confirm the family loaded with all its weights:
fc-list | grep -i "Inter" | sort
Troubleshooting
Font installed but not showing in applications
Run fc-cache -f again, then restart the application. If the font is in ~/.fonts/, move it to ~/.local/share/fonts/ and re-cache. Some applications (notably LibreOffice) maintain their own font cache — go to Tools → Options → LibreOffice → Fonts and click Reset if needed.
fc-list shows the font but GNOME Font Viewer does not
GNOME Font Viewer reads the same fontconfig cache, but sometimes lags. Open a terminal and run nautilus -q to restart the file manager, or log out and back in.
Permission errors on system-wide install
Verify the file and directory permissions with ls -la /usr/local/share/fonts/MyFonts/. Files should be 644 and directories 755. Incorrect permissions mean the font is unreadable by other users even though it's on disk.
OTF/TTF font renders poorly
Rendering quality depends on fontconfig's hinting and anti-aliasing settings. On Fedora and Ubuntu these are tuned to sensible defaults. If rendering looks wrong, inspect /etc/fonts/conf.d/ for conflicting snippets, or install fontconfig-enhanced-defaults on Debian-based systems.
Frequently asked questions
- What is the difference between ~/.fonts and ~/.local/share/fonts?
- Both directories work, but ~/.fonts is a legacy path. The XDG Base Directory Specification standardised ~/.local/share/fonts as the correct location. Fontconfig still supports ~/.fonts for backward compatibility, but you should use the XDG path for new installs.
- Do I need to run fc-cache after installing fonts with apt or dnf?
- No. Package managers trigger fc-cache automatically via post-install scripts. You only need to run it manually when copying font files by hand.
- Can I install fonts without root if I need them system-wide?
- No. Writing to /usr/local/share/fonts/ requires root. If you lack root access, install fonts to ~/.local/share/fonts/ instead; applications running under your account will find them there.
- Why does my browser not show a newly installed font in web pages?
- Browsers cache the system font list at launch. Restart the browser after running fc-cache. Also note that web pages can only use locally installed fonts when CSS specifies them by exact family name and the font is not overridden by a web font.
- How do I remove a manually installed font?
- Delete the font file from the directory you installed it into, then run fc-cache -f (with sudo if it was a system-wide install). The font will disappear from fc-list output after the cache rebuilds.
Related guides
Linux Clipboards Explained (+ Clipboard Managers)
Learn the difference between Linux's PRIMARY and CLIPBOARD selections, use xclip, xsel, and wl-clipboard from the terminal, and manage history with GPaste or Klipper.
Configure LibreOffice for Daily Use
Configure LibreOffice for daily use: set default save formats for MS Office interop, tune autosave, install fonts, and add productivity extensions.
Configure the Touchpad and Multitouch Gestures
Configure Linux touchpad behavior and multitouch gestures using libinput, libinput-gestures, and native GNOME and KDE Plasma settings on both Wayland and X11.
Wayland vs X11: How to Choose and Configure Each
Know when to run Wayland or X11, how to check your current session, switch at login with GDM/SDDM/LightDM, and handle NVIDIA and XWayland edge cases.