Linux ldd command

Updated: 04/26/2017 by Computer Hope

About ldd

Print shared library dependencies.

Description

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

ldd syntax

ldd [OPTION]... FILE...

Options

--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:

linux-vdso.so.1 =>  (0x00007fff6f3fe000)
libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f574c095000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f574be91000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f574bac7000)
/lib64/ld-linux-x86-64.so.2 (0x00007f574c2e4000)

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