1、ldd /usr/bin/ls 查看libc.so.6所指的位置 libc.so.6 => /lib64/libc.so.6 ,然后ll /lib64/libc.so.6所链接的位置lrwxrwxrwx 1 root root 12 Mar 12 2021 /lib64/libc.so.6 -> libc-2.28.so
2、如方法一查找到/lib64/libc.so.6,直接执行
GNU C Library (GNU libc) stable release version 2.28.
Copyright (C) 2018 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 A
PARTICULAR PURPOSE.
Compiled by GNU CC version 8.4.1 20200928 (Red Hat 8.4.1-1).
libc ABIs: UNIQUE IFUNC ABSOLUTE
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.
3、ldd --version
ldd (GNU libc) 2.28
Copyright (C) 2018 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 A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
4、getconf GNU_LIBC_VERSION
getconf -a | grep GNU_LIBC_VERSION
GNU_LIBC_VERSION glibc 2.28