What does which do?
which shows the full path of the program that runs when you type a command.
which command
Most useful options
| Option | What it does |
|---|---|
| -a | all matches in PATH |
which examples
In security work
which quickly tells you whether a tool is installed and which copy on PATH will run.
Questions about which
What is PATH?
A list of folders the shell searches for programs. echo $PATH shows it.