Using aptitude
If a package was installed using the package manager, running the following command will display packages that are installed and that contain the word keyword
in their name:
aptitude search '~i keyword'
Example
aptitude search '~i samba'
This returns the following list of packages on my system:
i samba - SMB/CIFS file, print, and login server for Unix
i samba-common - common files used by both the Samba server and client
i samba-common-bin - common files used by both the Samba server and client
i system-config-samba - GUI for managing samba shares and users
The i
stands for installed.
Using which
You can also use which
if you know the name of the executable you are searching for; it will return executable-name
's path if it is installed, and nothing otherwise.
which executable-name
Example
which system-config-samba
This returns the following on my system:
/usr/sbin/system-config-samba
I therefore know that system-config-samba
is installed, and I know where.