Search notes:

Shell command: which

which XYZ searches the directories that are listed in the $PATH environment variable for an executable or script named XYZ and, if found, prints the path to the executable or script:
$ which which
/usr/bin/which
If an executable or script is not found, which prints nothing.
If there are multiple executable or scripts, which only prints the first one found.
which ${progname} is equivalent to type -P ${progname}.

See also

Shell commands
whichpm: a cross-platform script that locates installed Perl modules by their package name.
The Windows executable where.exe and the PowerShell command get-command.

Index