# Learning which libraries are used for a binary

**URL:** <https://linux-tips.com/t/learning-which-libraries-are-used-for-a-binary/219>\
**Category:** Programming\
**Created:** [December 14, 2008, 6:50pm UTC](https://linux-tips.com/t/learning-which-libraries-are-used-for-a-binary/219 "2008-12-14T18:50:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![demirten](https://linux-tips.com/user_avatar/linux-tips.com/demirten/32/64_2.png) [@demirten](https://linux-tips.com/u/demirten)\
**Post date:** [December 14, 2008, 6:50pm UTC](https://linux-tips.com/t/learning-which-libraries-are-used-for-a-binary/219/1 "2008-12-14T18:50:01Z")

</div>

You can use `ldd` command to display all of the libraries which linked against a binary:

```
ldd /sbin/mkfs
  linux-gate.so.1 => (0xb7fad000)
  libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7e3a000)
  /lib/ld-linux.so.2 (0xb7fae000)

```

Sometimes, especially on embedded systems other than i386 architecture, there is no ldd utility. If you found this type of system and wants to learn the used libraries for a binary, you can use directly `ld-linux.so.2` as below:

```
/lib/ld-linux.so.2 --list /sbin/mkfs
  linux-gate.so.1 => (0xb7fad000)
  libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7e3a000)
  /lib/ld-linux.so.2 (0xb7fae000)
```
