Software on Lunix comes in packages. Packages contain all the support files to run the software package. Although each linux distribution is different... slightly... the general idea is the same.
The dpkg and dpkg-query commands can be used to find out about packages.
List Installed Packages (-l)
To find out about package installed use the dpkg command with the -l switch.
Which will list all installed packages on your system. Here is a sample output of the python files.
interactive high-level object-oriented language (de
Python interface to libapt-pkg
Python interface to libapt-pkg (locales)
universal character encoding detector
List Support Files for a Package (-L)
dpkg -L samba
Use the -L command line switch to list all support directories and files for a specific package.
Will list the 100 directories and files that support samba. However, it will not list files that are in other packages that samba depends on e.g. samba-common which is a seperate package and has only 38 directories and files.
Querying for packages... (dpkg-query)
dpkg-query [<option> ...] Commands: -s|--status -p|--print-avail -L|--listfiles -l|--list [ -W|--show [ -S|--search --control-list --control-show -c|--control-path -?, --help Show this help message.
To query installed packages... use the dpkg-query command:
Command line switches (they refer to as commands):
... Display package status details. ... Display available version details. ... List files `owned' by package(s). ...] List packages concisely. ...] Show information on package(s). ... Find package(s) owning file(s). Print the package control file list.
Show the package control file.
[ Print path for package control file.