Quick, practical ways to see which shared libraries an executable or a running process has loaded. 05.01.2026 | reading time: 3 min He often needs to know which shared libraries a program depends on or which ones a running process actually has mapped; this guide shows concrete commands to list those libraries for both executables and live processes so he can troubleshoot, audit, or optimize. Check a binary before running it Use `ldd` to list the dynamic libraries an executable will load; try this example to see `ls` dependencies: ```bash $ ldd /bin/ls linux-vdso.so.1 (0x00007ffc12345000) libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007f8e1d3d0000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8e1c00f000) /lib64/ld-linux-x86-64.so.2 (0x00007f8e1d7f4000) ``` Inspect libraries used by a running process To see what a live process has actually mapped, read `/proc/<pid>/maps` or use `pmap`; example sequence: ```bash $ pidof sshd 1234 $ cat /proc/1234/maps | grep .so 7f8e1c000000-7f8e1c021000 r-xp 00000000 08:01 123456 /lib/x86_64-linux-gnu/libc-2.31.so ``` This shows the loaded shared objects and their memory ranges for the process with PID 1234. When ldd is not enough Remember that `ldd` shows what an executable will request at startup, not what a process has loaded after runtime modifications; use `lsof -p <pid>` or `readelf -d` to inspect runtime handles or the ELF dynamic section, and consult `ldconfig -p` to see the system cache of available shared libraries. Practical tips and pitfalls Do not run `ldd` on untrusted binaries without care because it may execute code under some circumstances; prefer analyzing with `readelf -d` when security matters, and be aware that containerized or chrooted environments can change library paths so he should check the target environment's `ld.so.cache` via `ldconfig` or `/etc/ld.so.conf` when huntin g missing libraries. Looking forward Listing shared libraries is an entry to deeper system understanding: he can combine these commands in scripts to build inventories, detect mismatches, or automate remediation; keep practicing and consider formal certification such as CompTIA Linux+ or LPIC-1 and intensive exam preparation at bitsandbytes.academy to turn these hands-on skills into a proven qualification. Join Bits & Bytes Academy First class LINUX exam preparation. utilities processes troubleshooting