
The ECN No Name Newsletter is no longer being published. This is an archived issue.
[previous article] [next article]
Thomas Statnick
Setting the correct command search path for a UNIX login environment is essential for the proper functioning of your account. The search path tells the system where to look for user commands. If it is set incorrectly some or all commands and applications will not be available to you.
Several years ago, the Common UNIX Environment (CUE) project was started by both the Engineering Computer Network and the Purdue University Computing Center (PUCC). Among other things, the CUE defines a default search path for all CUE compliant systems (all ECN Suns running Solaris and many PUCC instructional Suns running Solaris). This default search path is set automatically by the system during the login process, so there is no need to manually set a path unless you wish to add or remove components to the command search path. In addition, the CUE states that commands and applications are located in the same directories across all PUCC and ECN CUE hosts. This means the same path will work the same way on any CUE host, regardless of where the host is located.
The directories included in this default path and their general purpose are listed below in the order which they are searched. This default path will find all user level commands, applications, and utilities on any CUE compliant host. There is no need to override the system default unless you want to customize your command search path.
There are two additional components specified by the CUE which are not part of the default search path. The /usr/new/bin directory is where the newest software is placed before it is moved into /usr/opt/bin or /usr/local/bin. We generally cannot change versions of software in the middle of a semester because of the impact to instructional courses, so new versions of software which are installed mid-semester are placed in /usr/new/bin. Sometimes "beta" versions of software are placed here also.
2i The /usr/old/bin directory is where old versions of software are placed once they are moved out of /usr/opt/bin or /usr/local/bin. This is usually done to allow for a "migration" period to new versions of software. To take advantage of these components, add them to your path as described in the examples below.
Should you need to customize the search path, it is important to maintain the default command path within the customized path. It is also important to use "$HOME" (in the case of Bourne/Korn shell) or "\s+6\v'+0.5\ ~\v'-0.5\s-6" (in the case of Csh/Tcsh shell) to represent your home directory when setting the search path, so the path will continue to work even if your home directory is moved. The following examples illustrate how to customize the search path properly.
Example 1:
Add /usr/unsup/bin to the path
Example 2:
Add your personal bin to the front of the path and add
/usr/unsup/bin to the end of the path
Example 3:
My personal path. Add my bin first, then add /usr/new/bin,
then include the default path, then add /usr/old/bin at the
end. This setup gives preference to new software.
If you have any questions about the default search path or customizing your search path, consult the document titled Migrating to Solaris and the Common UNIX Environment (ECN document number 199-F) or the URL " http://www.ecn.purdue.edu/ECN/Documents/SOLARIS/". If you have additional questions, please see your Site Specialist.