Learn a Linux command every day (114): LDD

Time:2021-9-10

Command introduction

The LDD command prints shared library dependencies for programs and libraries. Note: LDD is not an executable program, but just a shell script.

Syntax format

ldd [OPTION]... FILE...

Option description

--Version # print instruction version number
-V # print all relevant information
-U # print unused direct dependencies
-D # perform relocation and report any missing objects
-R # performs relocation of data objects and functions and reports any missing objects and functions
--Help # displays help information

Application examples

Print version information

[[email protected] ~]# ldd --version
ldd (GNU libc) 2.17
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

Print shared library dependencies for / bin / Bash

[[email protected] ~]# ldd /bin/bash
    linux-vdso.so.1 =>  (0x00007ffd15ca8000)
    libtinfo.so.5 => /lib64/libtinfo.so.5 (0x00007f7343eab000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007f7343ca7000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f73438d9000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f73440d5000)

Learn a Linux command every day (114): LDD