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.
HOME
The 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.
LOGNAME
getlogin
(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.
PATH
PATH
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.
TERM
TERM
environment variable, for example.
TZ
LANG
LC_ALL
nor the specific environment variable for that
category is set. See Locales, for more information about
locales.
LC_ALL
LC_*
environment variables. The
value of the other LC_*
environment variables is simply ignored
in this case.
LC_COLLATE
LC_CTYPE
LC_MESSAGES
LC_MONETARY
LC_NUMERIC
LC_TIME
NLSPATH
catopen
function
looks for message translation catalogs.
_POSIX_OPTION_ORDER
getopt
and
argp_parse
. See Argument Syntax.