ENVIRON(7) | MidnightBSD Miscellaneous Information Manual | ENVIRON(7) |
environ
— user
environment
extern char **environ;
An array of strings, called the environment is made available to each process by execve(2) when a process begins. By convention these strings have the form name=value, and are referred to as “environment variables”. A process can query, update, and delete these strings using the getenv(3), setenv(3), and unsetenv(3) functions, respectively. The shells also provide commands to manipulate the environment; they are described in the respective shell manual pages.
What follows is a list of environment variables typically seen on a UNIX system. It includes only those variables that a user can expect to see during their day-to-day use of the system, and is far from complete. Environment variables specific to a particular program or library function are documented in the ENVIRONMENT section of the appropriate manual page.
BLOCKSIZE
BLOCKSIZE
may be specified in units of a byte by
specifying a number, in units of a kilobyte by specifying a number
followed by ‘K
’ or
‘k
’, in units of a megabyte by
specifying a number followed by ‘M
’
or ‘m
’, and in units of a gigabyte
by specifying a number followed by
‘G
’ or
‘g
’. Sizes less than 512 bytes or
greater than a gigabyte are ignored. This variable is processed by the
getbsize(3)
function.COLUMNS
EDITOR
EXINIT
HOME
LANG
LC_*
variables are
set.LC_ALL
LC_COLLATE
,
LC_CTYPE
, LC_MESSAGES
,
LC_MONETARY
, LC_NUMERIC
,
LC_TIME
and LANG
.LC_COLLATE
LC_CTYPE
LC_MESSAGES
LC_MONETARY
LC_NUMERIC
LC_TIME
MAIL
MANPATH
NLSPATH
LC_MESSAGES
. See
catopen(3).PAGER
PATH
PATH
is set to
``/usr/bin:/bin'' initially by
login(1).POSIXLY_CORRECT
PRINTER
PWD
SHELL
TERM
TERMCAP
TERM
, or, if
it begins with a '/', the name of the termcap file. See
TERMPATH
below, and
termcap(5).TERMPATH
TERMPATH
is equivalent to a
TERMPATH
of
$HOME/.termcap:/etc/termcap.
TERMPATH
is ignored if
TERMCAP
contains a full pathname.TMPDIR
TZ
env TZ=America/Los_Angeles
date
displays the current time in California. See tzset(3) for more information.
USER
LOGNAME
instead.Further names may be placed in the environment by the
export
command and name=value
arguments in sh(1), or by the
setenv
command if you use
csh(1). It is unwise to
change certain sh(1)
variables that are frequently exported by .profile
files, such as MAIL
, PS1
,
PS2
, and IFS
, unless you
know what you are doing.
The current environment variables can be printed with
env(1),
set(1) or
printenv(1) in
sh(1) and
env(1),
printenv(1) or the
printenv
built-in command in
csh(1).
cd(1), csh(1), env(1), ex(1), login(1), printenv(1), sh(1), execve(2), execle(3), getbsize(3), getenv(3), setenv(3), setlocale(3), system(3), termcap(3), termcap(5)
The environ
manual page appeared in
Version 7 AT&T UNIX.
August 5, 2020 | midnightbsd-3.1 |