which is a command that is used to locate a program in the user’s
$PATH. In fact,
which displays the location of the argument’s executable. In easier-to-understand terminology,
which shows where the tool in question is located in your computer’s file system.
Here is an example of using
which. In this case, we are finding the file location of the
When I run this on my Scholar, I receive the following output:
This means that my
pwd executable is stored here:
which can be helpful in a number of ways, but is in unlikely that you will need to use it during the semester. However, there are times where more than one version of an executable program is on your machine, and you need to know which you are using. In this case,
which is a tool that can help.