Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Shell Scripting
  • Kali Linux
  • Ubuntu
  • Red Hat
  • CentOS
  • Docker in Linux
  • Kubernetes in Linux
  • Linux interview question
  • Python
  • R
  • Java
  • C
  • C++
  • JavaScript
  • DSA
Open In App

fc-list command in Linux with examples

Last Updated : 10 Oct, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

fc-list command is a part of the fontconfig system. It is used to list the available fonts and font styles. Using the format option, the list of all fonts can be filtered and sorted out. Moreover, multiple parameters can be passed to it after a colon symbol (:) to restrict the information that is being displayed on the screen.

Syntax

fc-list [options] [pattern] {element ...}

The fc-list command lists fonts matching the specified pattern and element. If no pattern or element is provided, it lists all fonts installed on the system.

Basic Example

It will print all the file locations of the font files present in the system, with their font name, spacing, and style type.

fc-list

Key Options for the fc-list Command

OptionDescription
-v, --verboseDisplays the entire font pattern verbosely, showing detailed information about each font.
-f, --format=FORMATCustomizes the output using the specified format.
-q, --quietSuppresses all normal output, but returns exit status 1 if no fonts match the pattern.
-V, --versionDisplays the version of fontconfig being used, then exits.
-h, --helpShows the help message for the fc-list command, providing information on available options.

Common Use Cases and Examples

1. fc-list with font-family

It will print only the names of the font families, without displaying the other aforementioned details.

fc-list : family 
fc-list with font-family


2. fc-list with font family + Language selector

It will print only the names of the font families which support the selected language code, without displaying the other aforementioned details.

Note: The language code used here is "ta", which stands for the language Tamil.

fc-list : family lang=ta 
family lang=ta for Tamil

Note: The language code used here is "hi", which stands for the language Hindi.

fc-list : family lang=hi
family lang=hi for hindi

3. fc-list with other selectors

Similar to the family selector, we can also select the file location, spacing or/and style of the required fonts to be displayed onscreen.

fc-list : family style 
fc-list with other selectors

Note: Sorting and unique can also be incorporated along with this command

fc-list : family spacing | sort | uniq
Sorting

4. fc-list with format option

This option is used to format the output text to the required pattern given by the user. In this example, the format option is used to get the family names of all the fonts, sorted and unique.

fc-list --format="%{family[0]}\n" | sort | uniq
fc-list with format option

Conclusion

The fc-list command is a powerful tool for listing and managing fonts on Linux. If you need to view all available fonts, filter them by family or language, or format the output for further analysis, fc-list offers a range of options and functions to meet your needs. By mastering the fc-list command, you'll have better control over the fonts installed on your Linux system, making it easier to work with typography, design, and multi-lingual text.


M

MukkeshMckenzie
Improve
Article Tags :
  • Linux-Unix
  • linux-command
  • Linux-misc-commands

Similar Reads

    env command in Linux with Examples
    The 'env' command in Linux is a versatile tool used to manage environment variables. It can print all the current environment variables, set new ones, or run a command within a custom environment. Additionally, 'env' is commonly used in shell scripts to launch the correct interpreter, ensuring the s
    3 min read
    eval command in Linux with Examples
    eval is a built-in Linux command that executes arguments as a shell command. It combines arguments into a single string, uses it as input to the shell, and executes the commands. Syntaxeval [arg ...]Here, arg can be one or more arguments that eval will process and combine into a single shell command
    2 min read
    ex command in Linux with examples
    ex (stands for extended) is a text editor in Linux which is also termed as the line editor mode of the vi editor. This editor simply provided some editing commands which has greater mobility. With the help of this editor, a user can easily move between files. Also, he/she has a lot of ways to transf
    4 min read
    exec command in Linux with examples
    The 'exec' command in Linux is a powerful shell built-in used to replace the current shell process with a new command process. Unlike typical commands that create a new process, 'exec' transforms the existing process, directly impacting the efficiency and behavior of scripts.What is the exec Command
    3 min read
    exit command in Linux with Examples
    The 'exit' command is a fundamental command in Linux used to exit the current shell session. This command is widely used in scripting and command-line operations, allowing users and scripts to terminate a session or a process in a controlled manner. The 'exit' command can take an optional parameter
    2 min read
    expand Command in LINUX with examples
    Whenever you work with files in LINUX there can be a situation when you are stuck with a file containing many tabs and whatever you need to do with a file requires that file with no tabs but with spaces. In this situation, the task looks quite simple if you are dealing with a small file but what if
    3 min read
    expect command in Linux with Examples
    expect command or scripting language works with scripts that expect user inputs. It automates the task by providing inputs. // We can install expect command using following if not installed // On Ubuntu $sudo apt install expect // On Redhat based systems $ yum install expect First we write a script
    2 min read
    export command in Linux with Examples
    The 'export' command is one of the essential built-in commands in the Bash shell, allowing users to manage environment variables effectively. It is defined in POSIX standards, which state that the shell will assign the export attribute to specified variables, causing them to be included in the envir
    2 min read
    expr command in Linux with examples
    The expr command in Unix is a versatile tool used for evaluating expressions in the shell environment. It performs a wide range of functions, including arithmetic calculations, string operations, and comparisons based on regular expressions.What is the 'expr' Command?expr stands for "expression" and
    3 min read
    factor command in Linux with examples
    The factor command in Linux is used to print the prime factors of the given numbers, either given from the command line or read from standard input. The numbers given through standard input may be delimited by tabs, spaces or newlines. Syntaxfactor [NUMBER]You can provide one or more numbers as argu
    2 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences