Linux: How to List & Install Font

By Xah Lee. Date: . Last updated: .

On Linux, where are font installed?

Linux (Ubuntu) font locations are at:

How to install font on Linux?

Just copy your TrueType font (.ttf) into one of the dir.

Or, you can launch a font viewer, by clicking on the ttf font or in terminal type sudo gnome-font-viewer fontfile.ttf then click the install button there.

If you get error (possibly because a earlier version is already installed), then just manually copy the font to the dir as instructed above.

How to view font on Linux?

Double click the ttf font to open.

Or, in terminal:

sudo gnome-font-viewer fontfile.ttf

linux gnome-font-viewer screenshot 2014-02-09
Linux gnome-font-viewer screenshot

Config Font Preference

How to config font selection preference?

Create a file at ~/.fonts.conf with the following content.

<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
   <family>DejaVu Serif</family>
   <family>Bitstream Vera Serif</family>
   <family>Droid Serif</family>
   <family>AR PL UMing CN</family>
   <family>AR PL ShanHeiSun Uni</family>
   <family>Droid Sans Fallback</family>
   <family>WenQuanYi Micro Hei</family>
   <family>WenQuanYi Zen Hei</family>

Restart the app. It will use the preference.

This is particularly useful if a webpage doesn't specify language, is utf-8 encoded, and uses serif font for Chinese, that may results in ugly mixed serif and non-serif Chinese chars. 〔➤see Displaying Chinese Results Ugly Mixed Font

Clear Font Cache

# clear font cache
sudo fc-cache -f -v

Restart each app to use the new font. Or, relog.

back to Font Articles Index

back to Xah Linux Tutorial