From: http://www.linuxquestions.org/questions/linux-software-2/how-to-check-glibc-version-263103/
Method 1:
Find the DSO (dynamic shared object) of libc and run it, as shown below:
[Whb @ jcwkyl ~] $ Locate libc. so
/Lib/libc. so.6
/Lib/i686/nosegneg/libc. so.6
/Usr/lib/libc. so
[Whb @ jcwkyl ~] $/Lib/libc. so.6
The gnu c Library stable release version 2.5, by Roland McGrath et al.
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR
Particle PURPOSE.
Compiled by gnu cc version 4.1.2 20070626 (Red Hat 4.1.2-14 ).
Compute on a Linux 2.6.9 system on 2008-05-23.
Available extensions:
The C stubs add-on version 2.1.2.
Crypt add-on version 2.1 by Michael gglad and others
GNU Libidn by Simon Joseph fsson
GNU libio by Per Bothner
NIS (YP)/NIS + NSS modules 0.19 by Thorsten Kuk
Native POSIX Threads Library by Ulrich Drepper et al
BIND-8.2.3-T5B
RT using linux kernel aio
Thread-local storage support supported ded.
For bug reporting instructions, please see:
<Http://www.gnu.org/software/libc/bugs.html>.
Method 2:
Compile and run the following C code:
# Include <stdio. h> <br/> # include <gnu/libc-version.h> <br/> int main (void) {puts (gnu_get_libc_version (); return 0 ;}
[Whb @ jcwkyl c] $ gcc checkglibcversion. c-o checkglibcversion
[Whb @ jcwkyl c] $./checkglibcversion
2.5