Important shell environment variables


Some environment variables (set with VAR=value; export VAR in Bourne-derived shells, or setenv VAR value in csh-derived shells) have special significance to the user environment.

PATH
A colon-separated list of directories to search for executables if no full path name is given on the command line, such as /usr/local/bin:/usr/bin:/bin.
LD_LIBRARY_PATH
A colon-separated list of directories to search for shared libraries, such as /usr/local/openssl/lib:/usr/local/lib:/usr/shlib (normally /lib and /usr/lib are always searched, or /shlib and /usr/shlib on some BSD systems).

In many cases it is necessary to modify the default PATH and LD_LIBRARY_PATH to provide easy access to locally-installed programs.

Some applications also use environment variables and additional account configuaration files to specify options or configuration settings, and these need to be created to make an application work as well.

Both Bourne-derived and csh-derived shells also have shell variables that control the default shell prompt; it may be worth setting these to include things like the user name, host name, current directory, or command history number. For example, in bash one can do this:

PS1='\u@\h:\w \!>'

to get a prompt like this:

stevev@darkwing:~ 501>

Next ->


Steve VanDevender
Last modified: Tue Jul 22 13:53:28 PDT 2003