Setting the Search Path

All UNIX systems use the concept of a "search path" to help in the location of programs. The search path is a list of directories that may contain programs the user wants to run. When the user types the name of a command (program), the directories in the search path are examined to see whether they contain an executable with the requested name. As soon as an executable is found, that program in executed.

When you add another directory to the search path, it is best to add it to the head of the path, so that programs will be found there first, in preference to programs of the same name in another directory in the search path. The way you add a new directory to the search path depends on the type of shell (command interpreter) that you use. Suppose you want to add the directory /usr/java/bin to the search path:

Jim Home