Show the full path of shell commands

The which command shows the full path of shell commands in Linux. This command searches only paths set in the PATH environment variable and returns the first match it finds (to search for all matches, use the -a option).

For example, to display the path of the touch executable, we canĀ use the following command:

linux which command

To get all paths where the touch executable is present in the system, we can use the -a option:

linux which command a option

Subscribe to our Newsletter

Like us on Facebook

top
Geek University 2019