which
Shows where in your path a command is located
which command-list
The which utility searches the directories listed in the PATH variable and displays the absolute pathname of each file in command-list that it finds.
Arguments
The command-list contains one or more commands (utilities) that which searches for. For each command which searches the directories listed in your PATH environment variable, in order, and displays the full pathname of the first command (executable file) it finds. If which does not locate a command, it displays an error message.
Options
--all
-a all Displays all matching executable files in PATH, not just the first.
--read-alias
-i Reads aliases from standard input and reports on matching aliases in addition to executable ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access