Options of Which Command
The following are the options of which command:
Option | Description | Example |
---|---|---|
-a , --all |
Display all matches found, instead of just the first | which -a python |
--skip-alias |
Skip aliases and proceed searching | which --skip-alias ls |
-h , --help |
Display help information | which --help |
-V , --version |
Display version information | which --version |
How to Display Path of an Executable File in Linux | Which Command
which command in Linux is a command that is used to locate the executable file associated with the given command by searching it in the path environment variable. It has 3 return statuses as follows:
- 0 : If all specified commands are found and executable.
- 1 : If one or more specified commands is nonexistent or not executable.
- 2 : If an invalid option is specified.
Table of Content
- What is Which Command in Linux?
- Options of Which Command
- Example of Which Command
- How to Display Path of an Executable File in Linux?
- Pratical Examples and Options of the `which` Command in Linux
- Differnce between Where and Which Command