These environment variables have standard meanings. This doesn't mean that they are always present in the environment; but if these variables are present, they have these meanings. You shouldn't try to use these environment variable names for some other purpose.
HOMEto any value. If you need to make sure to obtain the proper home directory for a particular user, you should not use
HOME; instead, look up the user's name in the user database (see section User Database). For most purposes, it is better to use
HOME, precisely because this lets the user specify the value.
getlogin(see section Identifying Who Logged In) is better for that purpose. For most purposes, it is better to use
LOGNAME, precisely because this lets the user specify the value.
PATHholds a path used for searching for programs to be run. The
execvpfunctions (see section Executing a File) use this environment variable, as do many shells and other utilities which are implemented in terms of those functions. The syntax of a path is a sequence of directory names separated by colons. An empty string instead of a directory name stands for the current directory (see section Working Directory). A typical value for this environment variable might be a string like:
:/bin:/etc:/usr/bin:/usr/new/X11:/usr/new:/usr/local/binThis means that if the user tries to execute a program named
foo, the system will look for files named `foo', `/bin/foo', `/etc/foo', and so on. The first of these files that exists is the one that is executed.
TERMenvironment variable, for example.
TZ, for information about the format of this string and how it is used.
LC_ALLnor the specific environment variable for that category is set. See section Locales and Internationalization, for more information about locales.
getopt. See section Program Argument Syntax Conventions.
Go to the first, previous, next, last section, table of contents.