The command takes one or more arguments; for each of these arguments, it prints the full path of the executable to stdout that would have been executed if this argument had been entered into the shell. It does this by searching for an executable or script in the directories listed in the environment variable PATH. The which command is part of most Unix-like computers. It is also part of the C Shell.[5]
Carlo Wood developed the GNU implementation used in most Linux-based operating systems.[7]
On FreeBSD, the which utility was originally written in Perl by Wolfram Schneider. The current version of which was rewritten by Daniel Papasian using the Cprogramming language.[8]