Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KlausEverWalkingDev/f262c988d90eebbfddd1d2934f375b4f to your computer and use it in GitHub Desktop.
Save KlausEverWalkingDev/f262c988d90eebbfddd1d2934f375b4f to your computer and use it in GitHub Desktop.
Install Ubuntu Fonts on RedHat/Fedora Linux

1 - Open the terminal and type below given command

cd /root
yum install wget       (you can skip this step if wget is already installed)
wget https://assets.ubuntu.com/v1/fad7939b-ubuntu-font-family-0.83.zip (check the newest version)

2 - Check if the directory /usr/share/fonts exist. If the fonts directory do not exist,you can create yourself.

mkdir -p /usr/share/fonts

3 - Now unzip the downloaded Ubuntu fonts file

cd /root
yum install unzip  (You can skip this step,if unzip is already installed)
unzip fad7939b-ubuntu-font-family-0.83.zip

4 - Now copy ubuntu-font-family-0.83 directory into /usr/share/fonts/

cp -rvf ubuntu-font-family-0.83 /usr/share/fonts/

Inside directory ubuntu-font-family,you can see many .ttf files

[root@CentOS-server ubuntu-font-family-0.83]# 
[root@CentOS-server ubuntu-font-family-0.83]# ls -l
total 4120
-rw-r--r-- 1 root root    865 Sep 22  2011 CONTRIBUTING.txt
-rw-rw-r-- 1 root root    155 Sep 26  2011 copyright.txt
-rw-r--r-- 1 root root  10120 Sep 26  2011 FONTLOG.txt
-rw-rw-r-- 1 root root   8980 Sep 26  2011 LICENCE-FAQ.txt
-rw-rw-r-- 1 root root   4673 Oct  8  2010 LICENCE.txt
-rw-r--r-- 1 root root    612 Sep 22  2011 README.txt
-rw-r--r-- 1 root root    183 Sep 22  2011 TRADEMARKS.txt
-rw-r--r-- 1 root root 356980 Sep 22  2011 Ubuntu-BI.ttf
-rw-r--r-- 1 root root 333616 Sep 22  2011 Ubuntu-B.ttf
-rw-r--r-- 1 root root 350420 Sep 22  2011 Ubuntu-C.ttf
-rw-r--r-- 1 root root 409608 Sep 22  2011 Ubuntu-LI.ttf
-rw-r--r-- 1 root root 415552 Sep 22  2011 Ubuntu-L.ttf
-rw-r--r-- 1 root root 366992 Sep 22  2011 Ubuntu-MI.ttf
-rw-rw-r-- 1 root root 216208 Sep 26  2011 UbuntuMono-BI.ttf
-rw-rw-r-- 1 root root 191400 Sep 26  2011 UbuntuMono-B.ttf
-rw-rw-r-- 1 root root 210216 Sep 26  2011 UbuntuMono-RI.ttf
-rw-rw-r-- 1 root root 205748 Sep 26  2011 UbuntuMono-R.ttf
-rw-r--r-- 1 root root 341324 Sep 22  2011 Ubuntu-M.ttf
-rw-r--r-- 1 root root 386440 Sep 22  2011 Ubuntu-RI.ttf
-rw-r--r-- 1 root root 353824 Sep 22  2011 Ubuntu-R.ttf
[root@CentOS-server ubuntu-font-family-0.83]# 

5 - Now run the fc-cache command. The fc-cache command build the information caches in directory.If you do not get any error then the fonts are successfully installed.

fc-cache -fv

You have more options with fc-cache command. for this run the command:

fc-cache --help
[root@CentOS-server ~]# fc-cache --help
usage: fc-cache [-frsvVh] [--force|--really-force] [--system-only] [--verbose] [--version] [--help] [dirs]
Build font information caches in [dirs]
(all directories in font configuration by default).

  -f, --force          scan directories with apparently valid caches
  -r, --really-force   erase all existing caches, then rescan
  -s, --system-only    scan system-wide directories only
  -v, --verbose        display status information while busy
  -V, --version        display font config version and exit
  -h, --help           display this help and exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment