Operations 4 min read

How to Install and Manage Custom Fonts on Ubuntu 18.04

This guide walks through installing the Hack TrueType font on Ubuntu 18.04, covering downloading from GitHub, extracting the archive, creating a local fonts directory, moving files, rebuilding the font cache, verifying the installation, and optionally removing the font, with all commands provided.

Liangxu Linux
Liangxu Linux
Liangxu Linux
How to Install and Manage Custom Fonts on Ubuntu 18.04

Environment

Ubuntu 18.04.3 LTS.

Download and extract the Hack font

Use wget to download the tarball from GitHub and extract it.

bob@ubuntu-18-04:~$ wget https://github.com/source-foundry/Hack/releases/download/v3.003/Hack-v3.003-ttf.tar.xz
bob@ubuntu-18-04:~$ tar -xvf Hack-v3.003-ttf.tar.xz
./
./Hack-Bold.ttf
./Hack-BoldItalic.ttf
./Hack-Italic.ttf
./Hack-Regular.ttf

Create a local fonts directory

If the directory does not exist, create it:

bob@ubuntu-18-04:~$ mkdir -p ~/.local/share/fonts

Move the font files

bob@ubuntu-18-04:~$ mv Hack-*.ttf ~/.local/share/fonts

Regenerate the font cache

bob@ubuntu-18-04:~$ fc-cache -f -v

Verify the installation

List installed fonts and filter for “Hack”:

bob@ubuntu-18-04:~$ fc-list | grep "Hack"

Uninstall the font

Remove the font files and rebuild the cache:

bob@ubuntu-18-04:~$ rm -rf ~/.local/share/fonts/Hack-*.ttf
bob@ubuntu-18-04:~$ fc-cache
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Linuxcommand-lineUbuntuFont InstallationHack Font
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.