which Linux Command
In this tutorial, we will learn about which Linux Command with examples. which command is used to know which command is executed by the shell. It locates the command/utility and prints the pathname to the console. There can be multiple programs with the same name. The which command prints the path of the command executed by the shell.
Command Format
$ which [flags] argument
To know more about the command, type the man command
$ man which
Example
For example, to know the pathname of the pwd command executed by the shell.
Launch the Terminal/Konsole and type the following command.
$ which pwd
The shell would execute the pwd command from /usr/bin/pwd
—
Linux Commands Tutorial page:
https://www.testingdocs.com/linux-basic-commands-tutorial/
More Information on Ubuntu Linux:
https://ubuntu.com/