or
printenv PATH
After typing the above command, the search path will look like:
/bin:/usr/bin:/.software/local/.admin/bins/bin: usr/openwin/bin
where ':' distinguishes between different pathnames.
As mentioned before, the shell seeks the program name in directories set in PATH.
The PATH is searched sequentially.
For example, if PATH=/bin:/usr/bin:/... shell starts to look for the program in /bin, then /usr/bin etc. At the moment the program is found, it is executed.
Presence of the /bin directory in the PATH is essential, for all external
UNIX commands are located there.
By default, the current directory is not in the PATH.
It can be added to the PATH, but it is not recommended. Why?