Tech Junkie Blog - Real World Tutorials, Happy Coding!: Linux Package Management: Viewing Shared Libraries With ldd And pmap

Monday, June 6, 2022

Linux Package Management: Viewing Shared Libraries With ldd And pmap

 As a Linux administrator you will eventually have to deal with libraries.  Libraries are the building blocks of applications and most applications uses shared libraries among them.  I could be beneficial to load the shared libraries from a centralized location.  For example if you want to load shared libraries for developers in a particular location, you can do that.

To load the libraries from a cached location we first need to view the shared libraries in the application/process.  Let's work with the currently running process.  First let's get the processes that are running with the ps -l command.  The first way you can view the shared libraries information is by running the ldd command, the ldd command needs the path to the process.  

As you can see bash is one of the processes that is currently running that is a good candidate to run the ldd command on, but we don't know the path to the process.  We can get more information about the process with the command ps aux | grep bash

From the ps aux command we found out the the path of the process is /bin/bash for root so we can finally view the libraries for bash with the command ldd /bin/bash

As you can see that was quite a lot of work to get to the path.  There's another way to get the libraries for bash and that is the pmap command.  For the pmap command you will need the pid of the process so to see the bash process libraries you can type pmap 870


  1. This comment has been removed by the author.

  2. This comment has been removed by the author.

  3. Very helpful blog. I am very happy to visit your blog. Now I am found what I want. I check your blog every day and try to learn something from your blog. Thank you and waiting for your new post. Also, Visit my website too. Thank you.

  4. very nice Content. Visit now:

  5. It is truly an honour to run across informational content like the one you have written. You are evidently knowledgeable on this written topic and you have unique views to share.
    SAP training in Kolkata
    SAP course in Kolkata

  6. Good to read this article when starting a blog. Happy to read that is only a limitation in our minds Thanks!


Search This Blog