NetBSD/share/man/man7/environ.7

290 lines
7.2 KiB
Groff
Raw Normal View History

2003-07-20 12:13:52 +04:00
.\" $NetBSD: environ.7,v 1.18 2003/07/20 08:13:52 lukem Exp $
.\"
.\" Copyright (c) 1983, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
1993-03-21 12:45:37 +03:00
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" @(#)environ.7 8.3 (Berkeley) 4/19/94
1993-03-21 12:45:37 +03:00
.\"
2003-07-20 12:13:52 +04:00
.Dd July 20, 2003
1993-03-21 12:45:37 +03:00
.Dt ENVIRON 7
.Os
1993-03-21 12:45:37 +03:00
.Sh NAME
.Nm environ
1998-04-30 13:38:54 +04:00
.Nd user process environment
1993-03-21 12:45:37 +03:00
.Sh SYNOPSIS
.Ar extern char **environ ;
.Sh DESCRIPTION
An array of strings called the
1998-04-30 13:38:54 +04:00
.Em environment
1993-03-21 12:45:37 +03:00
is made available by
1998-04-30 13:38:54 +04:00
.Xr execve 2
when a process begins.
By convention these strings have the form
1993-03-21 12:45:37 +03:00
.Dq Ar name=value .
The following names are used by various commands:
2001-01-03 16:35:11 +03:00
.Bl -tag -width LIBC_DIAGASSERT
.It Ev AUDIOCTLDEVICE
The name of the audio control device to be used by
.Xr audioctl 1 ,
.Xr audioplay 1
and
.Xr audiorecord 1 .
.It Ev AUDIODEVICE
The name of the audio device to be used by
.Xr audioplay 1
and
.Xr audiorecord 1 .
.It Ev BLOCKSIZE
The size of the block units used by several commands, most notably
.Xr df 1 ,
.Xr du 1
and
.Xr ls 1 .
1998-04-30 13:38:54 +04:00
.Ev BLOCKSIZE
may be specified in units of a byte by specifying a number,
in units of a kilobyte by specifying a number followed by
.Dq K
or
.Dq k ,
in units of a megabyte by specifying a number followed by
.Dq M
or
.Dq m
and in units of a gigabyte by specifying a number followed
by
.Dq G
or
.Dq g .
Sizes less than 512 bytes or greater than a gigabyte are ignored.
1993-03-21 12:45:37 +03:00
.It Ev EXINIT
A startup list of commands read by
1998-04-30 13:38:54 +04:00
.Xr ex 1
1993-03-21 12:45:37 +03:00
and
1998-04-30 13:38:54 +04:00
.Xr vi 1 .
1993-03-21 12:45:37 +03:00
.It Ev HOME
A user's login directory, set by
1998-04-30 13:38:54 +04:00
.Xr login 1
1993-03-21 12:45:37 +03:00
from the password file
1998-04-30 13:38:54 +04:00
.Xr passwd 5 .
2003-07-20 12:13:52 +04:00
.It Ev LANG
Default for all NLS categories.
Only used if
.Ev LC_ALL
or the environment variable for a particular NLS category
is not provided
.Ev ( LC_COLLATE ,
.Ev LC_CTYPE ,
.Ev LC_MESSAGES ,
.Ev LC_MONETARY ,
.Ev LC_NUMERIC ,
or
.Ev LC_TIME ) .
.It Ev LC_ALL
Override for all NLS categories.
If set, overrides the values of
.Ev LC_COLLATE ,
.Ev LC_CTYPE ,
.Ev LC_MESSAGES ,
.Ev LC_MONETARY ,
.Ev LC_NUMERIC ,
and
.Ev LC_TIME .
.It Ev LC_COLLATE
NLS string-collation order information.
.It Ev LC_CTYPE
NLS character classification, case conversion, and other character attributes.
.It Ev LC_MESSAGES
NLS format for affirmative and negative responses.
.It Ev LC_MONETARY
NLS rules and symbols for formatting monetary numeric information.
.It Ev LC_NUMERIC
NLS rules and symbols for formatting nonmonetary numeric information.
.It Ev LC_TIME
NLS rules and symbols for formatting time and date information.
2001-01-03 16:35:11 +03:00
.It Ev LIBC_DIAGASSERT
Control how the
.Fn _DIAGASSERT
macro (from
.Pa \*[Lt]assert.h\*[Gt] )
2001-01-03 16:35:11 +03:00
behaves once the assertion is raised.
Refer to
.Xr _DIAGASSERT 3
for more information.
.It Ev MALLOC_OPTIONS
Control the behaviour of the
.Fn malloc
function.
Refer to
.Xr malloc 3
for more information.
.It Ev MIXERDEVICE
The name of the audio mixer device to be used by
.Xr mixerctl 1 .
2003-04-02 20:41:50 +04:00
.It Ev PAGER
The program used for paginating the output of several commands
such as
.Xr man 1 .
If null or not set, the standard pagination program
.Xr more 1
will be used.
1993-03-21 12:45:37 +03:00
.It Ev PATH
The sequence of directories, separated by colons, searched by
1998-04-30 13:38:54 +04:00
.Xr csh 1 ,
.Xr sh 1 ,
.Xr system 3 ,
.Xr execvp 3 ,
1993-03-21 12:45:37 +03:00
etc, when looking for an executable file.
PATH is set to
.Dq /usr/bin:/bin:/usr/pkg/bin:/usr/local/bin
initially by
1998-04-30 13:38:54 +04:00
.Xr login 1 .
1993-03-21 12:45:37 +03:00
.It Ev PRINTER
The name of the default printer to be used by
1998-04-30 13:38:54 +04:00
.Xr lpr 1 ,
.Xr lpq 1 ,
1993-03-21 12:45:37 +03:00
and
1998-04-30 13:38:54 +04:00
.Xr lprm 1 .
.It Ev RCMD_CMD
When using the
.Xr rcmd 3
function, this variable is used as the program to run instead of
.Xr rcmd 1 .
1993-03-21 12:45:37 +03:00
.It Ev SHELL
The full pathname of the user's login shell.
.It Ev TERM
The kind of terminal for which output is to be prepared.
This information is used by commands, such as
1998-04-30 13:38:54 +04:00
.Xr nroff 1
.\" or
.\" .Xr plot 1
1998-04-30 13:38:54 +04:00
which may exploit special terminal capabilities.
See
1993-03-21 12:45:37 +03:00
.Pa /usr/share/misc/termcap
.Pq Xr termcap 5
1993-03-21 12:45:37 +03:00
for a list of terminal types.
.It Ev TERMCAP
The string describing the terminal in TERM, or, if
it begins with a '/', the name of the termcap file.
See
.Ev TERMPATH
below,
1998-04-30 13:38:54 +04:00
.Xr termcap 5 ,
1993-03-21 12:45:37 +03:00
and
1998-04-30 13:38:54 +04:00
.Xr termcap 3 .
1993-03-21 12:45:37 +03:00
.It Ev TERMPATH
A sequence of pathnames of termcap files, separated by colons or spaces,
1998-04-30 13:38:54 +04:00
which are searched for terminal descriptions in the order listed.
Having no
1993-03-21 12:45:37 +03:00
.Ev TERMPATH
is equivalent to a
.Ev TERMPATH
of
.Dq Pa $HOME/.termcap:/usr/share/misc/termcap .
1993-03-21 12:45:37 +03:00
.Ev TERMPATH
is ignored if
.Ev TERMCAP
contains a full pathname.
2001-10-15 17:22:22 +04:00
.It Ev TIMEFORMAT
A
.Xr strftime 3
2001-10-15 17:44:19 +04:00
format string that may be used by programs such as
2001-10-15 17:22:22 +04:00
.Xr dump 8
for formatting timestamps.
.It Ev TMPDIR
The directory in which to store temporary files.
Most applications use either
1998-04-30 13:38:54 +04:00
.Pa /tmp
or
1998-04-30 13:38:54 +04:00
.Pa /var/tmp .
Setting this variable will make them use another directory.
.It Ev TZ
The timezone to use when displaying dates.
The normal format is a pathname relative to
1998-04-30 13:38:54 +04:00
.Pa /usr/share/zoneinfo .
For example, the command
1998-04-30 13:38:54 +04:00
.Ic env TZ=US/Pacific date
displays the current time in California.
See
.Xr tzset 3
for more information.
1993-03-21 12:45:37 +03:00
.It Ev USER
The login name of the user.
.El
.Pp
Further names may be placed in the environment by the
1998-04-30 13:38:54 +04:00
.Ic export
1993-03-21 12:45:37 +03:00
command and
.Ar name=value
arguments in
1998-04-30 13:38:54 +04:00
.Xr sh 1 ,
1993-03-21 12:45:37 +03:00
or by the
1998-04-30 13:38:54 +04:00
.Ic setenv
1993-03-21 12:45:37 +03:00
command if you use
1998-04-30 13:38:54 +04:00
.Xr csh 1 .
1993-03-21 12:45:37 +03:00
It is unwise to change certain
1998-04-30 13:38:54 +04:00
.Xr sh 1
1993-03-21 12:45:37 +03:00
variables that are frequently exported by
.Pa .profile
files, such as
.Ev MAIL ,
.Ev PS1 ,
.Ev PS2 ,
and
.Ev IFS ,
unless you know what you are doing.
.Sh SEE ALSO
.Xr audioctl 1 ,
.Xr audioplay 1 ,
.Xr audiorecord 1 ,
1993-03-21 12:45:37 +03:00
.Xr csh 1 ,
.Xr ex 1 ,
.Xr login 1 ,
2003-04-02 20:41:50 +04:00
.Xr man 1 ,
.Xr more 1 ,
1993-03-21 12:45:37 +03:00
.Xr sh 1 ,
.Xr execve 2 ,
2001-01-03 16:35:11 +03:00
.Xr _DIAGASSERT 3 ,
1993-03-21 12:45:37 +03:00
.Xr execle 3 ,
2001-01-03 16:35:11 +03:00
.Xr malloc 3 ,
.Xr rcmd 3 ,
1993-03-21 12:45:37 +03:00
.Xr system 3 ,
.Xr termcap 3 ,
.Xr audio 4 ,
2001-10-15 17:22:22 +04:00
.Xr termcap 5 ,
2003-07-20 12:13:52 +04:00
.Xr nls 7 ,
2001-10-15 17:22:22 +04:00
.Xr dump 8
1993-03-21 12:45:37 +03:00
.Sh HISTORY
The
1998-04-30 13:38:54 +04:00
.Nm
1993-03-21 12:45:37 +03:00
manual page appeared in
.Bx 4.2 .