To view the contents of a package using `apt-get`, you can use the following commands:
**View package metadata**
bash
dpkg -L
This will display the list of files and directories included in the package.
**Example:**
bash
dpkg -L libssl-dev
This will show you the contents of the `libssl-dev` package, including its headers,
libraries, and documentation.
**View package file list**
If you want to see a more detailed list of files, including their paths and permissions,
use:
bash
dpkg -c
**Example:**
bash
dpkg -c libssl-dev
This will display the contents of the `libssl-dev` package in a formatted list, showing
each file's path, size, and permissions.
**View package documentation**
To view the documentation for a package, use:
bash
apt-file search
**Example:**
bash
apt-file search libssl-dev
This will display a list of files related to the `libssl-dev` package, including any
documentation or manual pages.
Note that these commands require you to have `dpkg` and `apt-file` installed on your
system.
# apt-file:
sudo apt-file update
sudo apt-file show geoip-bin
geoip-bin: /usr/bin/geoiplookup
geoip-bin: /usr/bin/geoiplookup6
geoip-bin: /usr/lib/geoip/geoip-generator
geoip-bin: /usr/lib/geoip/geoip-generator-asn
geoip-bin: /usr/lib/geoip/geolite2-to-legacy-csv.sh
geoip-bin: /usr/lib/geoip/v4-to-v6-layout.pl
geoip-bin: /usr/share/doc/geoip-bin/changelog.Debian.gz
geoip-bin: /usr/share/doc/geoip-bin/copyright
geoip-bin: /usr/share/geoip/countryInfo.txt
geoip-bin: /usr/share/lintian/overrides/geoip-bin
geoip-bin: /usr/share/man/man1/geoiplookup.1.gz
geoip-bin: /usr/share/man/man1/geoiplookup6.1.gz