xref: /netbsd/share/man/man7/environ.7 (revision c4a72b64)
1.\"	$NetBSD: environ.7,v 1.14 2002/06/12 00:19:48 wiz 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 \*[Lt]assert.h\*[Gt] )
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
139.\" or
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 TIMEFORMAT
169A
170.Xr strftime 3
171format string that may be used by programs such as
172.Xr dump 8
173for formatting timestamps.
174.It Ev TMPDIR
175The directory in which to store temporary files.
176Most applications use either
177.Pa /tmp
178or
179.Pa /var/tmp .
180Setting this variable will make them use another directory.
181.It Ev TZ
182The timezone to use when displaying dates.
183The normal format is a pathname relative to
184.Pa /usr/share/zoneinfo .
185For example, the command
186.Ic env TZ=US/Pacific date
187displays the current time in California.
188See
189.Xr tzset 3
190for more information.
191.It Ev USER
192The login name of the user.
193.El
194.Pp
195Further names may be placed in the environment by the
196.Ic export
197command and
198.Ar name=value
199arguments in
200.Xr sh 1 ,
201or by the
202.Ic setenv
203command if you use
204.Xr csh 1 .
205It is unwise to change certain
206.Xr sh 1
207variables that are frequently exported by
208.Pa .profile
209files, such as
210.Ev MAIL ,
211.Ev PS1 ,
212.Ev PS2 ,
213and
214.Ev IFS ,
215unless you know what you are doing.
216.Sh SEE ALSO
217.Xr audioctl 1 ,
218.Xr audioplay 1 ,
219.Xr audiorecord 1 ,
220.Xr csh 1 ,
221.Xr ex 1 ,
222.Xr login 1 ,
223.Xr sh 1 ,
224.Xr execve 2 ,
225.Xr _DIAGASSERT 3 ,
226.Xr execle 3 ,
227.Xr malloc 3 ,
228.Xr system 3 ,
229.Xr termcap 3 ,
230.Xr audio 4 ,
231.Xr termcap 5 ,
232.Xr dump 8
233.Sh HISTORY
234The
235.Nm
236manual page appeared in
237.Bx 4.2 .
238