1.\" $NetBSD: environ.7,v 1.16 2003/04/02 19:14:15 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 April 2, 2003 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 PAGER 117The program used for paginating the output of several commands 118such as 119.Xr man 1 . 120If null or not set, the standard pagination program 121.Xr more 1 122will be used. 123.It Ev PATH 124The sequence of directories, separated by colons, searched by 125.Xr csh 1 , 126.Xr sh 1 , 127.Xr system 3 , 128.Xr execvp 3 , 129etc, when looking for an executable file. 130PATH is set to 131.Dq /usr/bin:/bin:/usr/pkg/bin:/usr/local/bin 132initially by 133.Xr login 1 . 134.It Ev PRINTER 135The name of the default printer to be used by 136.Xr lpr 1 , 137.Xr lpq 1 , 138and 139.Xr lprm 1 . 140.It Ev SHELL 141The full pathname of the user's login shell. 142.It Ev TERM 143The kind of terminal for which output is to be prepared. 144This information is used by commands, such as 145.Xr nroff 1 146.\" or 147.\" .Xr plot 1 148which may exploit special terminal capabilities. 149See 150.Pa /usr/share/misc/termcap 151.Pq Xr termcap 5 152for a list of terminal types. 153.It Ev TERMCAP 154The string describing the terminal in TERM, or, if 155it begins with a '/', the name of the termcap file. 156See 157.Ev TERMPATH 158below, 159.Xr termcap 5 , 160and 161.Xr termcap 3 . 162.It Ev TERMPATH 163A sequence of pathnames of termcap files, separated by colons or spaces, 164which are searched for terminal descriptions in the order listed. 165Having no 166.Ev TERMPATH 167is equivalent to a 168.Ev TERMPATH 169of 170.Dq Pa $HOME/.termcap:/usr/share/misc/termcap . 171.Ev TERMPATH 172is ignored if 173.Ev TERMCAP 174contains a full pathname. 175.It Ev TIMEFORMAT 176A 177.Xr strftime 3 178format string that may be used by programs such as 179.Xr dump 8 180for formatting timestamps. 181.It Ev TMPDIR 182The directory in which to store temporary files. 183Most applications use either 184.Pa /tmp 185or 186.Pa /var/tmp . 187Setting this variable will make them use another directory. 188.It Ev TZ 189The timezone to use when displaying dates. 190The normal format is a pathname relative to 191.Pa /usr/share/zoneinfo . 192For example, the command 193.Ic env TZ=US/Pacific date 194displays the current time in California. 195See 196.Xr tzset 3 197for more information. 198.It Ev USER 199The login name of the user. 200.El 201.Pp 202Further names may be placed in the environment by the 203.Ic export 204command and 205.Ar name=value 206arguments in 207.Xr sh 1 , 208or by the 209.Ic setenv 210command if you use 211.Xr csh 1 . 212It is unwise to change certain 213.Xr sh 1 214variables that are frequently exported by 215.Pa .profile 216files, such as 217.Ev MAIL , 218.Ev PS1 , 219.Ev PS2 , 220and 221.Ev IFS , 222unless you know what you are doing. 223.Sh SEE ALSO 224.Xr audioctl 1 , 225.Xr audioplay 1 , 226.Xr audiorecord 1 , 227.Xr csh 1 , 228.Xr ex 1 , 229.Xr login 1 , 230.Xr man 1 , 231.Xr more 1 , 232.Xr sh 1 , 233.Xr execve 2 , 234.Xr _DIAGASSERT 3 , 235.Xr execle 3 , 236.Xr malloc 3 , 237.Xr system 3 , 238.Xr termcap 3 , 239.Xr audio 4 , 240.Xr termcap 5 , 241.Xr dump 8 242.Sh HISTORY 243The 244.Nm 245manual page appeared in 246.Bx 4.2 . 247