which Linux command
In this tutorial, we will learn about which Linux Command with examples.
which Linux Command
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.
$ which [flags] argument
To know more about the command, type the man command
$ man which
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:
More Information on Ubuntu Linux: