DEV Community

Serhat Teker
Serhat Teker

Posted on • Originally published at tech.serhatteker.com on

3 2

Install Fonts in Linux

There may be different directories on different systems/distributions to install your fonts.

To get the list of font files and paths that your OS uses:

$ fc-list -f '%{file}\n' | sort
Enter fullscreen mode Exit fullscreen mode

If we take Ubuntu as an example, paths will be like:

  • ~/.local/share/fonts/ — fonts for particular user, local user
  • /usr/local/share/fonts/ — fonts for all users, systemwide

Copy your fonts under one of the directories above and reboot the system. If you don't want to reboot, cache them manually by running:

$ sudo fc-cache -fv
Enter fullscreen mode Exit fullscreen mode

Also many fonts are packaged for Ubuntu available via the "Fonts" category of the "Ubuntu Software Center". If you prefer apt-get, search for packages starting with "otf-" or "ttf-" and install them.

You can also double-click on the font file (or select "Open with Font Viewer" in the right-click menu). Then click the "Install Font" button.

After installation you can confirm they are installed correctly:

$ fc-list | grep <name-of-font>
Enter fullscreen mode Exit fullscreen mode

You may need to restart some programs, like Visual Studio Code, before they actually show the new fonts. Usually such programs are caching the font list when they start up.

OK, All done!

Do your career a big favor. Join DEV. (The website you're on right now)

It takes one minute, it's free, and is worth it for your career.

Get started

Community matters

Top comments (0)

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay