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 ...

Get A Practical Guide to Red Hat® Linux® 8 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.