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'
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
i stands for installed.
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.
This returns the following on my system:
I therefore know that
system-config-samba is installed, and I know where.