{"id":9678,"date":"2021-09-01T17:52:19","date_gmt":"2021-09-01T17:52:19","guid":{"rendered":"https:\/\/linuxways.net\/?p=9678"},"modified":"2021-09-01T17:52:19","modified_gmt":"2021-09-01T17:52:19","slug":"how-to-use-ldd-command-in-linux","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/centos\/how-to-use-ldd-command-in-linux\/","title":{"rendered":"How to Use LDD Command in Linux"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>ldd is the useful command to see executable files and shared object dependencies. Files that start with \/lib are called libraries. A library helps a program to use common processes without any handling or administration overhead.<\/p>\n<p>There are two types of libraries: static and dynamic libraries.<\/p>\n<p>Below is the guide on how to use the ldd command in Linux as we go through below.<\/p>\n<h2>Install the ldd command<\/h2>\n<p>If your ubuntu version is too old, let\u2019s run apt command to install:<\/p>\n<pre>$ sudo apt install libc-bin<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1059\" height=\"190\" class=\"wp-image-9679\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-536.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-536.png 1059w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-536-300x54.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-536-1024x184.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-536-768x138.png 768w\" sizes=\"auto, (max-width: 1059px) 100vw, 1059px\" \/><\/p>\n<h2>The syntax of ldd command<\/h2>\n<pre>$ ldd [option]... file...<\/pre>\n<p><strong>[option]<\/strong><\/p>\n<p><strong>-v <\/strong> show all information<\/p>\n<p><strong>-u <\/strong> show unused direct dependencies<\/p>\n<p><strong>-d <\/strong> data relocation<\/p>\n<p><strong>-r <\/strong> data and function relocation<\/p>\n<h2>Show detailed information<\/h2>\n<p>You can use the ldd command with option<strong> -v<\/strong> to show detailed information. For example, we will display detailed the dependencies of the ls command:<\/p>\n<pre>$ ldd -v \/bin\/ls<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1058\" height=\"568\" class=\"wp-image-9680\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-537.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-537.png 1058w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-537-300x161.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-537-1024x550.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-537-768x412.png 768w\" sizes=\"auto, (max-width: 1058px) 100vw, 1058px\" \/><\/p>\n<h2>Show unused direct dependencies<\/h2>\n<p>You can use the ldd command with option<strong> -u<\/strong> to show unused direct dependencies. For example:<\/p>\n<pre>$ ldd -u \/bin\/grep<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1058\" height=\"89\" class=\"wp-image-9681\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-538.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-538.png 1058w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-538-300x25.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-538-1024x86.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-538-768x65.png 768w\" sizes=\"auto, (max-width: 1058px) 100vw, 1058px\" \/><\/p>\n<h2>Conclusion<\/h2>\n<p>You have gone through the details of how to use the ldd command in Linux.<\/p>\n<p>Thanks for reading.<\/p>","protected":false},"excerpt":{"rendered":"<p>Introduction ldd is the useful command to see executable files and shared object dependencies. Files that start with \/lib are called libraries. A library helps a program to&hellip;<\/p>","protected":false},"author":1,"featured_media":9765,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,4,5,83,165,2],"tags":[511],"class_list":["post-9678","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","category-debian","category-mint","category-opensuse","category-red-hat","category-ubuntu","tag-ldd-command"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/9678","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=9678"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/9678\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/9765"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=9678"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=9678"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=9678"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}