A very basic question.

Whether all packages installed by apt-get install reside in the same folder? If yes, where?

If no, how to find the location?

I am in the case of installing matplotlib Basemap and it requires me to know where libgeos_c or geos_c.h file are located. I installed libgeos-3.4.2 using apt-get install and had no idea to find those files. Further question, what is whichcommand doing? I did which libgeos and it didn't output, while doing which python gave /usr/bin/python

  • 1
    What do you need to know the location for?
    – Pilot6
    Aug 29 '16 at 17:54
  • @Pilot6, to set the environment variable. I added explanation to my question.
    – iparjono
    Aug 29 '16 at 18:25

The basic answer is no, different applications install in different locations, and consist of multiple files. As a general rule the actual application will be installed in one of the locations in your PATH env variable, and you can check the directories in that variable with:

echo $PATH

But if you're trying to find a specific package's location you can use the dpkg command with the -L flag. For example if you wanted to find all of the installed files for Apache2, you could run:

dpkg -L apache2

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