[Linux] PATH

less than 1 minute read

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. linux1 The man documentation of ‘whereis’ tells that it searches file in location where specified by $PATH and $MANPATH. linux2 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. linux3 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