How to check glibc version on Linux

Question: I need to find out the version of the GNU C library (glibc) that I have on my Linux system. How can I check glibc version on Linux?

The GNU C library (glibc) is the GNU implementation of the standard C library. glibc is a critical component of the GNU toolchain, which is used along with binutils and compiler to generate userspace application binaries for a target architecture.

When built from source, some Linux programs may be required to link against a particular version of glibc. In that case, you may want to check out the information about installed glibc to see if dependencies are met.

Here are simple ways to check glibc version on Linux.

Method One

A simple command-line to check the version of the GNU C library is as follows.

$ ldd --version

In this example, the version of glibc is 2.19.

Method Two

Another method is to "type" the glibc library (i.e., from the command line as if it were a command.

The output will show more detailed information about glibc library, including the version of glibc and the GNU compiler used, as well as available glibc extensions. The location of glibc varies depending on distros and processor architectures.

On 64-bit Debian based system:

$ /lib/x86_64-linux-gnu/

on 32-bit Debian based system:

$ /lib/i386-linux-gnu/

On 64-bit Red Hat based system:

$ /lib64/

On 32-bit Red Hat based systems:

$ /lib/

Here is the sample output of typing glibc library.

Download this article as ad-free PDF (made possible by your kind donation): 
Download PDF

Subscribe to Ask Xmodulo

Do you want to receive Linux related questions & answers published at Ask Xmodulo? Enter your email address below, and we will deliver our Linux Q&A straight to your email box, for free. Delivery powered by Google Feedburner.

Support Xmodulo

Did you find this tutorial helpful? Then please be generous and support Xmodulo!

Leave a comment

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