What does ldd do?

print the shared libraries a program or library depends on.

▸ Explain your own ldd command →

ldd examples, explained

$ ldd /bin/ls

  • lddprint the shared libraries a program or library depends on
  • /bin/lsan argument passed to the command

$ ldd -v ./a.out

  • lddprint the shared libraries a program or library depends on
  • -vverbose — print all information, including symbol versioning
  • ./a.outan argument passed to the command

ldd flags & options

-vverbose — print all information, including symbol versioning
-uprint unused direct dependencies
-rperform relocations for both data and functions
-dperform relocations for data objects

Other commands

Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.