install fonts in ubuntu

How to Install Fonts in Ubuntu

Ubuntu supports wide range of fonts and allows you to easily change the system font style as per your requirement. But sometimes you may need to install new fonts on your Ubuntu system to make them available in your applications and documents. In this article, we will learn how to install fonts in Ubuntu.


How to Install Fonts in Ubuntu

Here are the steps to install fonts in Ubuntu.


1. Download Font Packages

First, you need to download required font packages to your system. You can download them from any of the websites of your choice. You can use wget or curl command to download the font package to your system. Here is an example to download bitwise font package from a website.

$ wget -O ~/Downloads/bitwise.zip https://www.1001freefonts.com/d/8190/bitwise.zip
$ unzip -p ~/Downloads/bitwise.zip Bitwise.ttf > ~/Downloads/Bitwise.ttf
$ rm ~/Downloads/bitwise.zip

The first command above downloads the bitwise font package’s zip file. Next, we unzip it to get the .ttf font file and move it to ~/Downloads folder. Lastly, we delete the downloaded zip file.


2. Install Fonts

All you need to do install fonts on your system, is copy/move the .ttf or .otf files of your font package to ~/.fonts folder. .fonts is a hidden folder in Ubuntu that holds the required files for all available fonts in Ubuntu.

$ mkdir ~/.fonts
$ cp ~/Downloads/Bitwise.ttf ~/.fonts

That’s it. Now your bitwise font is installed and usable.

You can use this method to install multiple fonts at once. If you want to manage them efficiently, you can create subfolders in /.fonts folder to organize your fonts.

Please note, moving the font files to ~/.fonts will only make them available to the present user and not all users in your system. If you want to make the font available to all users on your system, you have to copy the .ttf or .otf files to /usr/local/share/fonts folder.

$ sudo mkdir /usr/local/share/fonts/sample
$ sudo cp ~/Downloads/Bitwise.ttf /usr/local/share/fonts/sample/

Once you run the above commands, bitwise font will be available to all users in your system.

In this article, we have learnt how to install fonts in Ubuntu. You can use them to manage multiple fonts in Ubuntu.

Also read:

How to Increment & Decrement Variable in Shell Script
How to Get Current Directory of Bash Script
Apache Commands Cheat Sheet
How to Clone Git Repository to Specific Folder
How to Switch Python Version in Ubuntu/Debian

Leave a Reply

Your email address will not be published. Required fields are marked *