Setting Path Guidelines

Here are some guidelines for setting up efficient PATH variables:

If security is not a concern, put the current working directory
(.) first in the path. However, including the current working directory in
the path poses a security risk that you might want to avoid, especially for
superuser.

Keep the search path as short as possible. The shell searches
each directory in the path. If a command is not found, long searches can slow
down system performance.

The search path is read from left to right, so you should
put directories for commonly used commands at the beginning of the path.

Make sure that directories are not duplicated in the path.

Avoid searching large directories, if possible. Put large
directories at the end of the path.

Put local directories before NFS mounted directories to lessen
the chance of “hanging” when the NFS server does not respond.
This strategy also reduces unnecessary network traffic.