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.
CREATED2016-10-04 16:57:30.0
00-26-9F
UPDATED2016-10-04 17:32:06.0
List Installed Packages (-l)
dpkg -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.
ii
python
2.7.3-4+deb7u1
all
interactive high-level object-oriented language (de
ii
python-apt
0.8.8.2
amd64
Python interface to libapt-pkg
ii
python-apt-common
0.8.8.2
all
Python interface to libapt-pkg (locales)
ii
python-chardet
2.0.1-2
all
universal character encoding detector
CREATED2016-10-04 16:05:56.0
00-26-9E
UPDATED2016-10-04 17:28:07.0
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.
CREATED2016-10-04 17:15:39.0
00-26-A0
UPDATED2016-10-04 17:28:09.0
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.
]