which
Find out where a program lives
What it does
which shows the full path of the program a name runs, such as /usr/bin/python3. The shell looks for programs in the folders listed in PATH, in order, and which prints the first match.
It helps when several versions are installed and you are not sure which one runs, or when a command is "not found" and you want to check whether it exists at all.
Syntax
which <program>Examples
Find out where the python3 program lives
which python3which— path to a program from PATHpython3— program name