Linux ldd command

Updated: 05/04/2019 by Computer Hope
ldd command

On Unix-like operating systems, the ldd command prints shared library dependencies of programs and libraries.

This page covers the Linux version of ldd.


ldd prints the shared libraries required by each program or shared library specified on the command line.


ldd [OPTION]... FILE...


--version Print the version number of ldd.
-v, --verbose Print all information, including (for example) symbol versioning information.
-d, --data-relocs Perform relocations and report any missing objects (ELF only).
-r, --function-relocs Perform relocations for both data objects and functions, and report any missing objects or functions (ELF only).
-u, --unused Print unused direct dependencies.
--help Display a help message and exit.


ldd /bin/bash

Displays the shared library dependencies of the program /bin/bash. Output resembles the following: =>  (0x00007fff6f3fe000) => /lib/x86_64-linux-gnu/ (0x00007f574c095000) => /lib/x86_64-linux-gnu/ (0x00007f574be91000) => /lib/x86_64-linux-gnu/ (0x00007f574bac7000)
/lib64/ (0x00007f574c2e4000)

ld — Link editor for object files.
pvs — Display the internal version information of dynamic objects within an ELF file.