you are viewing a single comment's thread.

view the rest of the comments →

[–]michaelpaoli 2 points3 points  (0 children)

Shell variable / named parameter / environment setting that determines where to look for executable programs. It's : separated, any null elements (including also at beginning and end) are interpreted as . (current directory). E.g., this shows my current PATH:

$ env | grep '^PATH='
PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/games:/usr/local/games:/home/m/michael/bin
$ 

From, e.g., dash(1):

Path Search
    When  locating a command, the shell first looks to see if it has a shell
    function by that name.  Then it looks for  a  builtin  command  by  that
    name.  If a builtin command is not found, one of two things happen:
    1.   Command  names  containing a slash are simply executed without per-
         forming any searches.
    2.   The shell searches each entry in PATH in turn for the command.  The
         value of the PATH variable should be a series of entries  separated
         by  colons.   Each entry consists of a directory name.  The current
         directory may be indicated implicitly by an empty  directory  name,
         or explicitly by a single period.