List shared libraries using the LDD command in Linux

Home > Search > Linux commands
  by

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

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




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




Comments