General

PATH is a list of directories stored into user's environment that are searched when commands are executed. It allows users to write only the command itself without specifying full directory path each time. Directories are separated with colon ':'. Paths is specified with environment variables the same way other variables are defined, i.e. as KEY = VALUE pair. Only in this case the key must be 'PATH'. E.g.

PATH=$PATH:/usr/local/bin

Including the '$PATH' into the definition copies the current path to the new path first so that it is not written over. Using it is optional.

Setting the path

Writing the PATH definition into configuration file is rather trivial task. Difficulty often arises when suitable configuration file needs to be found. There are several possibilities depending on the situation. Please see DotFiles page for excellent discussion on the topic. The following picture should help as well.

dotFiles

path (last edited 2008-06-07 17:55:59 by AnttiM)