The which command shows the path of the executable that will run when you type a command name. It is useful when multiple versions of a tool may be installed.
Basic use
which python
which bash
which gccIf the command is found in your PATH, which prints the full path. If nothing is printed, the command may not be installed or may not be in your current PATH.
Check all matches
which -a pythonThis can help when troubleshooting path order or unexpected command versions.