Linux – How to see the currently loaded shared objects in Linux

librarieslinux

I have two, related questions:

• How can I see if a shared library is currently loaded? (i.e. system-wide, process agnostic)
• How can I see all shared libraries loaded by a process?

You can do both with lsof. To see what processes have a library open or mapped do:
lsof /path/to/lib.so

lsof -p <pid>