Question-1: Is there a way to know what all fonts are installed on the CentOS 6.2 through command-line?

I have checked the fonts with the following command

ls /usr/share/fonts/default/ghostscript/ and have got the following results:

bchb.afm   bchri.afm  fcyri.afm  fkarw.pfm    hrgero.gsf  hrgrro.gsf  hrpldb.gsf   hrplrbo.gsf  hrpls.gsf    hrplt.pfa   hrscso.gsf  putri.pfa     u004006t.afm
bchbi.afm  bchri.pfa  fcyri.gsf  fonts.dir    hrger.pfa   hrgrr.pfa   hrpldbi.gsf  hrplr.gsf    hrplso.gsf   hrsccb.gsf  hrscs.pfa   putr.pfa      u004006t.gsf
bchbi.pfa  bchr.pfa   fhirw.gsf  fonts.scale  hrgkc.gsf   hritrb.gsf  hrpldi.pfa   hrplro.gsf   hrpltb.gsf   hrscco.gsf  hrsyr.gsf   u003043t.afm  u004006t.pfm
bchb.pfa   fcyr.afm   fhirw.pfm  hrgerb.gsf   hrgks.gsf   hritro.gsf  hrpld.pfa    hrplsb.gsf   hrpltbi.gsf  hrscc.pfa   putbi.pfa   u003043t.gsf
bchr.afm   fcyr.gsf   fkarw.gsf  hrgerd.gsf   hrgrrb.gsf  hritr.pfa   hrplrb.gsf   hrplsbo.gsf  hrplti.pfa   hrscsb.gsf  putb.pfa    u003043t.pfm

and similar results I have got from running ls /usr/share/fonts/default/Type1 but I am not able to make out what kind font files are these (I know about .ttf, .otn and .fnt) and what all fonts does it contain like "courier new", "times new roman" etc.

Also there are other directories which have fonts:

ls /usr/share/fonts/opensymbol/ has opens___.ttf
ls /usr/share/fonts/dejavu/ has

DejaVuSans-BoldOblique.ttf           DejaVuSansCondensed.ttf         DejaVuSansMono.ttf          DejaVuSerifCondensed-BoldItalic.ttf  DejaVuSerif.ttf
DejaVuSans-Bold.ttf                  DejaVuSans-ExtraLight.ttf       DejaVuSans-Oblique.ttf      DejaVuSerifCondensed-Bold.ttf
DejaVuSansCondensed-BoldOblique.ttf  DejaVuSansMono-BoldOblique.ttf  DejaVuSans.ttf              DejaVuSerifCondensed-Italic.ttf
DejaVuSansCondensed-Bold.ttf         DejaVuSansMono-Bold.ttf         DejaVuSerif-BoldItalic.ttf  DejaVuSerifCondensed.ttf
DejaVuSansCondensed-Oblique.ttf      DejaVuSansMono-Oblique.ttf      DejaVuSerif-Bold.ttf        DejaVuSerif-Italic.ttf

Question-2:: Are there other directories for fonts and are these fonts installed on my system?

Question-3: Also is there a way to check if a particular font is installed on the system, for eg: I want to see whether Courier New is installed on my system or not.

Any help would be appreciated.


As for question one, fc-list gives you all fonts.

${HOME}/.fonts will contain additional fonts for your user.

fc-list | grep "Courier New" allows you to check if that particular font is installed.

  • sorry to sound naive but what path would be {HOME}? – Prakash K Jul 30 '13 at 8:58
  • 1
    ${HOME} is your home directory, you can check it using: echo ${HOME} in terminal. It might be such path like: /home/username – rwxrwxrwx Jul 30 '13 at 9:03

There is a command xlsfonts to list all fonts available in X.

  • doesn't work: -bash: xlsfonts: command not found – Prakash K Jul 30 '13 at 8:56
  • 2
    @PrakashK: you may need to install x11-utils package – Michał Šrajer Jul 30 '13 at 11:05

you can also try with python. For example using matplotlib:

python -c 'import matplotlib.font_manager; print "\n".join(matplotlib.font_manager.findSystemFonts(fontpaths=None, fontext="ttf"))'

on my linux it gives me output like:


UPDATE: Ofcourse you need python-matplotlib package for that. Try with yum, if not found , you can install it via pip or easy install, so:

sudo yum install python-matplotlib


pip install matplotlib


easy_install matplotlib
  • Doesn't work: ImportError: No module named matplotlib.font_manager I think I would have to install the module – Prakash K Jul 30 '13 at 8:57
  • @PrakashK: see update – Michał Šrajer Jul 30 '13 at 11:10


# fc-list

You can find all true type fonts in your disk with find: (caution: it can take long time to process)

# find / -type f -name "*.ttf"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.