Skip to content

which

Lists the location of an executable in the computer’s file system. If an executable is not installed on the computer and its parent directory is not part of the system’s $PATH, which will return error.

Terminal window
# Returns all /usr/bin/bash, exit code(0) i.e success
which -a bash
# Multiple executables check, exit code(0) i.e success
which cat tail
# Returns Nothing, exit code(1) i.e failure
which nonExistingApplicationInPath
OptionsDescription
-alist all available executable/application in PATH

NA