[Linux] PATH
Published:
In this post, the concept of PATH is introduced.
$PATH
Linux ‘whereis’ command let you know the location of the executable file of that command.
The man documentation of ‘whereis’ tells that it searches file in location where specified by $PATH and $MANPATH.
When we type ‘ls’ command in our terminal and get the result, the program named ‘ls’ is executed. However, ‘ls’ command works even when ‘ls’ file does not exist in the current directory. PATH is a linux variable contains data. In order to see the data, we can use the echo command.
When user writes ‘ls’ command, the operating system search file named ls from directories in PATH. By configuring $PATH, you don’t have to write the whole directory location of the file.

Leave a Comment