The `dpkg` command can be used to probe the Linux environment for information about installed packages. Use the `-l` argument to list the installed packages.
# Piping through `less`
Here "less" is a simple text reader used to scroll through the list of packages in a new buffer that opens in the existing terminal window. The list will not be mixed with other terminal commands and output. Hit `'q'` to return to terminal prompt. See "man less" for more info.
```
dpkg -l | less
```
# Match on List
To check whether a package is installed or not:
```
dpkg -l {package_name}
dpkg -l vlc
```
# Piping through `grep`
To check if the package is installed or not (for example, `vlc`).
```
dpkg -l | grep vlc
```
# Show the location of installed packages
Show the location where the package is installed. The "-S" (capital S) stands for "search"
```
sudo dpkg -S {package_name}
sudo dpkg -S skype
```