• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

ldd Command Examples in Linux

by admin

The ldd(1) (list dynamic dependencies) command displays the shared libraries that a program (or a shared library) requires to run. Here’s an example:

$ ldd prog
         libdemo.so.1 => /usr/lib/libdemo.so.1 (0x40019000)
         libc.so.6 => /lib/tls/libc.so.6 (0x4017b000)
         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

The ldd command enables a user to view shared library dependencies for an application. This can be useful for troubleshooting or gathering information about system requirements for an application.

Syntax

The syntax of the ldd command is:

# ldd [options] {program binary}

The ldd command resolves each library reference (employing the same search conventions as the dynamic linker) and displays the results in the following form:

library-name => resolves-to-path

ldd Command Examples

1. Display shared library dependencies of a binary:

# ldd path/to/binary

2. Display all information about dependencies:

# ldd --verbose path/to/binary

3. Display unused direct dependencies:

# ldd --unused path/to/binary

4. Report missing data objects and perform data relocations:

# ldd --data-relocs path/to/binary

5. Report missing data objects and functions, and perform relocations for both:

# ldd --function-relocs path/to/binary

Filed Under: Linux

Some more articles you might also be interested in …

  1. Understanding How an Email System Works
  2. module: command not found
  3. pngcrush for image optimization
  4. All Linux Compress/Decompress Commands
  5. How to uninstall scons package from Ubuntu
  6. arping: Discover and probe hosts in a network using the ARP protocol (Command Examples)
  7. Mutt, Mail and Telnet – Send mails from linux command line or terminal
  8. amass – In-depth Attack Surface Mapping and Asset Discovery tool
  9. d8: Developer shell for the V8 JavaScript engine
  10. Difference between the Java heap and native C heap

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright