It defines the order of directories which the computer will search for programs to execute. This is important when you have installed a program in a non-standard place, or when multiple versions of a program with the same name exist. For example, suppose you have two different versions of Git installed on your machine in /usr/bin/git and /usr/local/bin/git . If you don’t specify the full pathname on the command line and simply type in git , the OS uses the PATH to determine which one you mean.
$ echo $PATH
PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
This is a colon-delimited list of directory names. It means the OS will search directories for programs in the following precedence order:
Note: This will be the default path in all the system.
|/bin||This is used for trivial binaries used in the very early boot stage or ones that you need to have available in booting single-user mode|
|/sbin||Same, but for scripts with superuser (root) privileges required.|
|/usr/bin||Same as first, but for general system-wide binaries.|
|/usr/sbin||Same as above, but for scripts with superuser (root) privileges required.|
|/usr/local/bin||system-wide available scripts|
|/usr/local/sbin||Same as above with super user privileges.|
/usr/local – Tertiary hierarchy for local data, specific to this host.