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.
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.ttfCreate a local fonts directory
If the directory does not exist, create it:
bob@ubuntu-18-04:~$ mkdir -p ~/.local/share/fontsMove the font files
bob@ubuntu-18-04:~$ mv Hack-*.ttf ~/.local/share/fontsRegenerate the font cache
bob@ubuntu-18-04:~$ fc-cache -f -vVerify 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-cacheSigned-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
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.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
