Previous: Environment Access, Up: Environment Variables
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.
HOMEThe user can set HOME to 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 User Database).
For most purposes, it is better to use HOME, precisely because
this lets the user specify the value.
LOGNAMEgetlogin (see 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.
PATHPATH holds a path used
for searching for programs to be run.
The execlp and execvp functions (see 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 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/bin
This 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.
TERMTERM environment variable, for example.
TZLANGLC_ALL nor the specific environment variable for that
category is set. See Locales, for more information about
locales.
LC_ALLLC_* environment variables. The
value of the other LC_* environment variables is simply ignored
in this case.
LC_COLLATELC_CTYPELC_MESSAGESLC_MONETARYLC_NUMERICLC_TIMENLSPATHcatopen function
looks for message translation catalogs.
_POSIX_OPTION_ORDERgetopt and
argp_parse. See Argument Syntax.