Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?
share|improve this question

2 Answers 2

You can do both with lsof. To see what processes have a library open or mapped do:

lsof /path/to/lib.so

and to see what files (including shared libraries) a process has open and/or mapped, do:

lsof -p <pid>
share|improve this answer

Another way to see what's loaded in a process is by looking at the /proc/PID/maps file. This shows everything mapped into your address space, including shared objects mapped in.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.