xref: /netbsd-src/share/man/man7/environ.7 (revision 3b01aba77a7a698587faaae455bbfe740923c1f5)
1.\"	$NetBSD: environ.7,v 1.10 2001/01/03 13:35:11 lukem Exp $
2.\"
3.\" Copyright (c) 1983, 1990, 1993
4.\"	The Regents of the University of California.  All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\" 3. All advertising materials mentioning features or use of this software
15.\"    must display the following acknowledgement:
16.\"	This product includes software developed by the University of
17.\"	California, Berkeley and its contributors.
18.\" 4. Neither the name of the University nor the names of its contributors
19.\"    may be used to endorse or promote products derived from this software
20.\"    without specific prior written permission.
21.\"
22.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32.\" SUCH DAMAGE.
33.\"
34.\"	@(#)environ.7	8.3 (Berkeley) 4/19/94
35.\"
36.Dd January 4, 2001
37.Dt ENVIRON 7
38.Os
39.Sh NAME
40.Nm environ
41.Nd user process environment
42.Sh SYNOPSIS
43.Ar extern char **environ ;
44.Sh DESCRIPTION
45An array of strings called the
46.Em environment
47is made available by
48.Xr execve 2
49when a process begins.
50By convention these strings have the form
51.Dq Ar name=value .
52The following names are used by various commands:
53.Bl -tag -width LIBC_DIAGASSERT
54.It Ev AUDIOCTLDEVICE
55The name of the audio control device to be used by
56.Xr audioctl 1 ,
57.Xr audioplay 1
58and
59.Xr audiorecord 1 .
60.It Ev AUDIODEVICE
61The name of the audio device to be used by
62.Xr audioplay 1
63and
64.Xr audiorecord 1 .
65.It Ev BLOCKSIZE
66The size of the block units used by several commands, most notably
67.Xr df 1 ,
68.Xr du 1
69and
70.Xr ls 1 .
71.Ev BLOCKSIZE
72may be specified in units of a byte by specifying a number,
73in units of a kilobyte by specifying a number followed by
74.Dq K
75or
76.Dq k ,
77in units of a megabyte by specifying a number followed by
78.Dq M
79or
80.Dq m
81and in units of a gigabyte by specifying a number followed
82by
83.Dq G
84or
85.Dq g .
86Sizes less than 512 bytes or greater than a gigabyte are ignored.
87.It Ev EXINIT
88A startup list of commands read by
89.Xr ex 1
90and
91.Xr vi 1 .
92.It Ev HOME
93A user's login directory, set by
94.Xr login 1
95from the password file
96.Xr passwd 5 .
97.It Ev LIBC_DIAGASSERT
98Control how the
99.Fn _DIAGASSERT
100macro (from
101.Pa <assert.h> )
102behaves once the assertion is raised.
103Refer to
104.Xr _DIAGASSERT 3
105for more information.
106.It Ev MALLOC_OPTIONS
107Control the behaviour of the
108.Fn malloc
109function.
110Refer to
111.Xr malloc 3
112for more information.
113.It Ev MIXERDEVICE
114The name of the audio mixer device to be used by
115.Xr mixerctl 1 .
116.It Ev PATH
117The sequence of directories, separated by colons, searched by
118.Xr csh 1 ,
119.Xr sh 1 ,
120.Xr system 3 ,
121.Xr execvp 3 ,
122etc, when looking for an executable file.
123PATH is set to
124.Dq /usr/bin:/bin:/usr/pkg/bin:/usr/local/bin
125initially by
126.Xr login 1 .
127.It Ev PRINTER
128The name of the default printer to be used by
129.Xr lpr 1 ,
130.Xr lpq 1 ,
131and
132.Xr lprm 1 .
133.It Ev SHELL
134The full pathname of the user's login shell.
135.It Ev TERM
136The kind of terminal for which output is to be prepared.
137This information is used by commands, such as
138.Xr nroff 1
139or
140.Xr plot 1
141which may exploit special terminal capabilities.
142See
143.Pa /usr/share/misc/termcap
144.Pq Xr termcap 5
145for a list of terminal types.
146.It Ev TERMCAP
147The string describing the terminal in TERM, or, if
148it begins with a '/', the name of the termcap file.
149See
150.Ev TERMPATH
151below,
152.Xr termcap 5 ,
153and
154.Xr termcap 3 .
155.It Ev TERMPATH
156A sequence of pathnames of termcap files, separated by colons or spaces,
157which are searched for terminal descriptions in the order listed.
158Having no
159.Ev TERMPATH
160is equivalent to a
161.Ev TERMPATH
162of
163.Dq Pa $HOME/.termcap:/usr/share/misc/termcap .
164.Ev TERMPATH
165is ignored if
166.Ev TERMCAP
167contains a full pathname.
168.It Ev TMPDIR
169The directory in which to store temporary files.
170Most applications use either
171.Pa /tmp
172or
173.Pa /var/tmp .
174Setting this variable will make them use another directory.
175.It Ev TZ
176The timezone to use when displaying dates.
177The normal format is a pathname relative to
178.Pa /usr/share/zoneinfo .
179For example, the command
180.Ic env TZ=US/Pacific date
181displays the current time in California.
182See
183.Xr tzset 3
184for more information.
185.It Ev USER
186The login name of the user.
187.El
188.Pp
189Further names may be placed in the environment by the
190.Ic export
191command and
192.Ar name=value
193arguments in
194.Xr sh 1 ,
195or by the
196.Ic setenv
197command if you use
198.Xr csh 1 .
199It is unwise to change certain
200.Xr sh 1
201variables that are frequently exported by
202.Pa .profile
203files, such as
204.Ev MAIL ,
205.Ev PS1 ,
206.Ev PS2 ,
207and
208.Ev IFS ,
209unless you know what you are doing.
210.Sh SEE ALSO
211.Xr audioctl 1 ,
212.Xr audioplay 1 ,
213.Xr audiorecord 1 ,
214.Xr csh 1 ,
215.Xr ex 1 ,
216.Xr login 1 ,
217.Xr sh 1 ,
218.Xr execve 2 ,
219.Xr _DIAGASSERT 3 ,
220.Xr execle 3 ,
221.Xr malloc 3 ,
222.Xr system 3 ,
223.Xr termcap 3 ,
224.Xr audio 4 ,
225.Xr termcap 5
226.Sh HISTORY
227The
228.Nm
229manual page appeared in
230.Bx 4.2 .
231