Like it!

Join me 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.


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