Difference between which command and whereis command in Linux
For e.g. lets find where "samba" is located in a CentOS server
$ which samba which command searches the list of programs listed down through the PATH settings
$ whereis samba whereis command also searches for programs that are not present in the PATH setting