Linux – Quickly list all available fonts

Brief: This article shows you how to use fc-list command in Linux to get list of available fonts.

Have you ever wondered how to find all available fonts on your Linux system? Fear not. Try fc-list command. It is a quick and handy command to lists fonts and styles available on the Linux system for applications using fontconfig. You can use fc-list to find out whether a particular language font is installed or not.

List all available fonts on Linux using the CLI

Open the terminal application. To list all font faces, run:
$ fc-list
Use the more command as pager or grep command/egrep command to search for fonts:
$ fc-list | more
$ fc-list | grep -i "word"
$ fc-list | grep -i UbuntuMono

Quickly list all available fonts
To lists font faces that cover Hindi language:
$ fc-list :lang=hi
Sample outputs:

Lohit Hindi:style=Regular
/usr/share/fonts/truetype/freefont/FreeSansBold.ttf: FreeSans:style=Bold,получерен,negreta,tučné,fed,Fett,Έντονα,Negrita,Lihavoitu,Gras,Félkövér,Grassetto,Vet,Halvfet,Pogrubiony,Negrito,gros,Полужирный,Fet,Kalın,huruf tebal,жирний,Krepko,treknraksts,pusjuodis,đậm,Lodia,धृष्ट
/usr/share/fonts/truetype/freefont/FreeSans.ttf: FreeSans:style=Regular,нормален,Normal,obyčejné,Mittel,µεσαία,Normaali,Normál,Medio,Gemiddeld,Odmiana Zwykła,Обычный,Normálne,menengah,прямій,Navadno,vidējs,normalusis,vừa,Arrunta,सामान्य
/usr/share/fonts/truetype/Sarai/Sarai.ttf: Sarai:style=Regular
/usr/share/fonts/truetype/lohit-devanagari/Lohit-Devanagari.ttf: Lohit Devanagari:style=Regular
/usr/share/fonts/truetype/freefont/FreeSerif.ttf: FreeSerif:style=Regular,нормален,normal,obyčejné,Mittel,µεσαία,Normaali,Normál,Normale,Gemiddeld,odmiana zwykła,Обычный,Normálne,ปกติ,menengah,прямій,Navadno,vidējs,normalusis,عادی,vừa,Arrunta,सामान्य
/usr/share/fonts/truetype/samyak/Samyak-Devanagari.ttf: Samyak Devanagari:style=Regular
/usr/share/fonts/truetype/freefont/FreeSerifBold.ttf: FreeSerif:style=Bold,получерен,negreta,tučné,fed,Fett,Negrita,Lihavoitu,Gras,Félkövér,Grassetto,Vet,Halvfet,Pogrubiony,Negrito,gros,Обычный,Fet,ตัวหนา,Kalın,huruf tebal,жирний,Polkrepko,treknraksts,pusjuodis,ضخیم,đậm,Lodia,धृष्ट
/usr/share/fonts/truetype/Gargi/Gargi.ttf: Gargi,गार्गी:style=Regular,गार्गी
/usr/share/fonts/truetype/fonts-deva-extra/chandas1-2.ttf: Chandas:style=Regular
/usr/share/fonts/truetype/Sahadeva/sahadeva.ttf: Sahadeva:style=Regular
/usr/share/fonts/truetype/Nakula/nakula.ttf: Nakula:style=Regular
/usr/share/fonts/truetype/fonts-deva-extra/samanata.ttf: Samanata:style=Regular

Verbose output when listing fonts

Display verbose output of the whole font pattern for each match, or elements if any is provided as follows:
fc-list -v

Suppress all normal output

Pass the -q option to suppress all normal output. returns 1 as the exit status (error) code if no fonts matched. For example, look up for Waree font and if not found report it:

fc-list -q Waree
echo $?
fc-list -q WareeFooBar && echo "Font found" || echo "Font not found."
### search for Dyuthi font ###
fc-list -q "$f"
if [ $? -eq 0 ] 
    echo "Font $f found. The installation will continue..."
    echo "Font $f not found. The unstallation will abort..."
    exit 1

See how to use if .. else .. if for more info. You can show version of the program and exit with the following option:
fc-list -V

Getting help

Read fc-list man page by typing the following man command:
man fc-list
Another option is to get list of options by passing the -h option to fc-list as follows:
fc-list -h
Sample outputs:

usage: fc-list [-vqVh] [-f FORMAT] [--verbose] [--format=FORMAT] [--quiet] [--version] [--help] [pattern] {element ...} 
List fonts matching [pattern]
  -v, --verbose        display entire font pattern verbosely
  -f, --format=FORMAT  use the given output format
  -q, --quiet          suppress all normal output, exit 1 if no fonts matched
  -V, --version        display font config version and exit
  -h, --help           display this help and exit


Fontconfig is a library for configuring and customizing font access. See the Fontconfig user manual online here for more information on commands and other options.

🥺 Was this helpful? Please add a comment to show your appreciation or feedback.

nixCrat Tux Pixel Penguin
Hi! 🤠
I'm Vivek Gite, and I write about Linux, macOS, Unix, IT, programming, infosec, and open source. Subscribe to my RSS feed or email newsletter for updates.

0 comments… add one

Leave a Reply

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

Use HTML <pre>...</pre> for code samples. Your comment will appear only after approval by the site admin.