The which, whereis and whatis commands on a Linux system provide information about commands. They provide related but not identical information. In this post, we’ll check out the differences and provide a script for getting information that’s available from all three commands. We’ll also explore some sample commands for looking at secondary (i.e., not section 1) man pages.
The which command will show you the file-system location for a command’s executable. This is the file that is read and run whenever you type the command name.
$ which date
$ which shutdown
The which command will also report on your aliases and show you the commands they invoke.
Source:: Network World – Data Center