Install Custom Fonts on Your Linux System
· Updated: Jul 27, 2026 · Linux, Fonts, Customization
Table of contents
Introduction
Customizing fonts is a simple way to make your Linux system and applications your own. While clicking to install fonts can sometimes lead to inconsistencies, using the command-line interface (CLI) for installation ensures a reliable confirmation of font integration. This guide walks through installing custom font families on Linux using CLI methods.
Step 1: Download and Install Custom Fonts
To begin, you’ll need to obtain the custom fonts you want to use. Websites like Google Fonts and Font Squirrel offer an array of fonts to choose from. Once you’ve acquired your preferred fonts, follow these steps to install them on your Linux system using CLI:
-
For All Users (/usr/share/fonts/):
- Create a directory for the font family within the system-wide fonts directory:
sudo mkdir -p /usr/share/fonts/YourCustomFont- Copy the downloaded font files (usually in TrueType font format, .ttf) to the font family directory:
sudo cp /path/to/font-file.ttf /usr/share/fonts/YourCustomFont/- Update the font cache to ensure the system recognizes the new fonts:
sudo fc-cache -f -v -
For Current User (~/.local/share/fonts/):
- Create a directory for your fonts in your user’s fonts directory (if it doesn’t already exist):
mkdir -p ~/.local/share/fonts- Copy the downloaded font files (usually in TrueType font format, .ttf) to your user’s fonts directory:
cp /path/to/font-file.ttf ~/.local/share/fonts/- Update the font cache to ensure your system recognizes the new fonts:
fc-cache -f -v
Step 2: Verify Available Fonts
To confirm that the newly installed fonts are recognized by your system, you can use the following command:
fc-list | grep "YourCustomFont"
Optional: Configure Custom Font Families in Visual Studio Code
If you use Visual Studio Code and want to set a custom font family for your coding environment, you can follow these steps:
-
Launch Visual Studio Code.
-
Navigate to
File > Preferences > Settings. -
Alternatively, use the keyboard shortcut
Ctrl+,orCmd+,. -
Search for “font” to locate the “Text Editor: Font” setting.
-
Click the “Edit in settings.json” link next to the setting.
-
In the
settings.jsonfile, add the following configuration to set your desired font family:"editor.fontFamily": "YourCustomFont, monospace",Replace
"YourCustomFont"with the name of the font you installed.
Conclusion
Customizing fonts on your Linux system using CLI methods lets you add a personal touch with reliable results. With these steps, you can adjust the fonts used by your applications and create a setup that reflects your style.