Bootstrap FreeKB - Linux Commands - List shared libraries modules using the ldd command
Linux Commands - List shared libraries modules using the ldd command

Updated:   |  Linux Commands articles

A shared library is a file that can be used by numerous programs. The ldd command can be used to list the shared libraries required by a certain program. In this example, there are 4 shared library files used by bash.

[root@server1 ]# ldd /bin/bash
linux-gate.so.1 => (0x0059100)
libtinfo.so.5 => /lib/libtinfo.so.5
libdl.so.2 => /lib.libc.so.6
/lib/ld-linux.so.2

 


Determine unused dependencies

The -u or --unused option can be used to determine if any of the shared library files are not being used. In this example, the /lib/ld-linux.so.2 is not being used by bash.

[root@server1 ]# ldd -u /bin/bash
/lib/ld-linux.so.2

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 8c9198 in the box below so that we can be sure you are a human.