How can you determine installed versions of the glibc libraries?
a more comprehensive answer can be found by running
find /lib -iname 'libc*.so'
On a recent system this will give you results like this that show i'm using glibc 2.28 here on ubuntu 18.10
/lib/x86_64-linux-gnu/libc-2.28.so
/lib/x86_64-linux-gnu/libcrypt-2.28.so
/lib/i386-linux-gnu/libc-2.28.so
/lib/i386-linux-gnu/libcrypt-2.28.so
For multiarch system you can have multiple copies for 386 and 64 modes , i think these should be the same .
i didn't have a /lib/libc.so.* on my system.
To know the current installed version of glibc, please compile and run the following C code.
#include <stdio.h>
#include <gnu/libc-version.h>
int main (void) { puts (gnu_get_libc_version ()); return 0; }
Cheers !!!
For glibc:
/lib/libc.so.6
Sounds maybe strange to run a so file but should print out version information in this case
For the kernel version use uname
For the binutils parsing the output of ld --version
might yield what you expect, the same for gcc --version
. This is a bit tedious but I do not know another way.