Like it!

Join us on Facebook!

Like it!

How to install new fonts on Linux

The old and trusty command-line way.

There are many ways to install new fonts on Linux. In this article I want to investigate the manual one: simple, easy and straight to the point.

Where fonts are stored in Linux

First of all, fonts in Linux are located in various directories. However the standard ones are /usr/share/fonts, /usr/local/share/fonts and ~/.fonts. You can put your new fonts in any of those folders, just keep in mind that fonts in the ~/.fonts directory will be available only for your user.

Extract and copy fonts

Say you have just downloaded a bunch of new fonts, packed up in a .zip archive. The first step is to uncompress it somewhere in your home folder. Then copy the content in one of the three directories mentioned above. You can also create subfolders to make things well organized. Remember to invoke your copy command with sudo if you choose to install fonts in /usr/share/fonts or /usr/local/share/fonts, as they are system directories.

Refresh fonts cache

The last step is to refresh the font cache. This is necessary for those programs that uses fontconfig to list available fonts on the system. To perform a font cache refresh just do

sudo fc-cache -f -v

where -f means forced (we want to refresh everything) and -v means verbose, in order to print some useful information on installed fonts and newly discovered ones.

Sources

Askubuntu - How do I install fonts?
Ubuntu wiki - Fonts
Die.net - fc-cache(1) - Linux man page

comments
name on July 26, 2021 at 11:36
This was very easy!
Thank you
eggbean on October 06, 2021 at 06:56
There's also "$HOME/.local/share/fonts", which is good for when you don't have sudo rights.
fred on October 14, 2021 at 08:47
What's not to love about a site that takes inspiration from System 76's Pop!_OS?

Good choice.
rance on March 15, 2022 at 15:17
if youre putting you fonts in either
$HOME/.fonts
$HOME/.local/share/fonts

run fc-cache without sudo, otherwise you will cache the root user fonts, not the ones in your $HOME
UAman on November 05, 2023 at 19:54
Thanks. It worked for Mx Linux
Denis on November 17, 2023 at 05:57
Thank you! Have a good one!