You are here: >

Linux and Unix ldd command

ldd commandAbout ldd
ldd syntax
ldd examples
Related commands
Linux and Unix main page

About ldd

Print shared library dependencies.


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

ldd syntax

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 examples

ldd /bin/bash

Displays the shared library dependencies of the program /bin/bash. Output will resemble 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.