1.\" $NetBSD: environ.7,v 1.20 2003/08/07 10:31:20 agc 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. Neither the name of the University nor the names of its contributors 15.\" may be used to endorse or promote products derived from this software 16.\" without specific prior written permission. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28.\" SUCH DAMAGE. 29.\" 30.\" @(#)environ.7 8.3 (Berkeley) 4/19/94 31.\" 32.Dd July 20, 2003 33.Dt ENVIRON 7 34.Os 35.Sh NAME 36.Nm environ 37.Nd user process environment 38.Sh SYNOPSIS 39.Ar extern char **environ ; 40.Sh DESCRIPTION 41An array of strings called the 42.Em environment 43is made available by 44.Xr execve 2 45when a process begins. 46By convention these strings have the form 47.Dq Ar name=value . 48The following names are used by various commands: 49.Bl -tag -width LIBC_DIAGASSERT 50.It Ev AUDIOCTLDEVICE 51The name of the audio control device to be used by 52.Xr audioctl 1 , 53.Xr audioplay 1 54and 55.Xr audiorecord 1 . 56.It Ev AUDIODEVICE 57The name of the audio device to be used by 58.Xr audioplay 1 59and 60.Xr audiorecord 1 . 61.It Ev BLOCKSIZE 62The size of the block units used by several commands, most notably 63.Xr df 1 , 64.Xr du 1 65and 66.Xr ls 1 . 67.Ev BLOCKSIZE 68may be specified in units of a byte by specifying a number, 69in units of a kilobyte by specifying a number followed by 70.Dq K 71or 72.Dq k , 73in units of a megabyte by specifying a number followed by 74.Dq M 75or 76.Dq m 77and in units of a gigabyte by specifying a number followed 78by 79.Dq G 80or 81.Dq g . 82Sizes less than 512 bytes or greater than a gigabyte are ignored. 83.It Ev EXINIT 84A startup list of commands read by 85.Xr ex 1 86and 87.Xr vi 1 . 88.It Ev HOME 89A user's login directory, set by 90.Xr login 1 91from the password file 92.Xr passwd 5 . 93.It Ev LANG 94Default for all NLS categories. 95Only used if 96.Ev LC_ALL 97or the environment variable for a particular NLS category 98is not provided 99.Ev ( LC_COLLATE , 100.Ev LC_CTYPE , 101.Ev LC_MESSAGES , 102.Ev LC_MONETARY , 103.Ev LC_NUMERIC , 104or 105.Ev LC_TIME ) . 106.It Ev LC_ALL 107Override for all NLS categories. 108If set, overrides the values of 109.Ev LC_COLLATE , 110.Ev LC_CTYPE , 111.Ev LC_MESSAGES , 112.Ev LC_MONETARY , 113.Ev LC_NUMERIC , 114and 115.Ev LC_TIME . 116.It Ev LC_COLLATE 117NLS string-collation order information. 118.It Ev LC_CTYPE 119NLS character classification, case conversion, and other character attributes. 120.It Ev LC_MESSAGES 121NLS format for affirmative and negative responses. 122.It Ev LC_MONETARY 123NLS rules and symbols for formatting monetary numeric information. 124.It Ev LC_NUMERIC 125NLS rules and symbols for formatting nonmonetary numeric information. 126.It Ev LC_TIME 127NLS rules and symbols for formatting time and date information. 128.It Ev LIBC_DIAGASSERT 129Control how the 130.Fn _DIAGASSERT 131macro (from 132.Aq Pa assert.h ) 133behaves once the assertion is raised. 134Refer to 135.Xr _DIAGASSERT 3 136for more information. 137.It Ev MALLOC_OPTIONS 138Control the behaviour of the 139.Fn malloc 140function. 141Refer to 142.Xr malloc 3 143for more information. 144.It Ev MIXERDEVICE 145The name of the audio mixer device to be used by 146.Xr mixerctl 1 . 147.It Ev PAGER 148The program used for paginating the output of several commands 149such as 150.Xr man 1 . 151If null or not set, the standard pagination program 152.Xr more 1 153will be used. 154.It Ev PATH 155The sequence of directories, separated by colons, searched by 156.Xr csh 1 , 157.Xr sh 1 , 158.Xr system 3 , 159.Xr execvp 3 , 160etc, when looking for an executable file. 161PATH is set to 162.Dq /usr/bin:/bin:/usr/pkg/bin:/usr/local/bin 163initially by 164.Xr login 1 . 165.It Ev PRINTER 166The name of the default printer to be used by 167.Xr lpr 1 , 168.Xr lpq 1 , 169and 170.Xr lprm 1 . 171.It Ev RCMD_CMD 172When using the 173.Xr rcmd 3 174function, this variable is used as the program to run instead of 175.Xr rcmd 1 . 176.It Ev SHELL 177The full pathname of the user's login shell. 178.It Ev TERM 179The kind of terminal for which output is to be prepared. 180This information is used by commands, such as 181.Xr nroff 1 182.\" or 183.\" .Xr plot 1 184which may exploit special terminal capabilities. 185See 186.Pa /usr/share/misc/termcap 187.Pq Xr termcap 5 188for a list of terminal types. 189.It Ev TERMCAP 190The string describing the terminal in TERM, or, if 191it begins with a '/', the name of the termcap file. 192See 193.Ev TERMPATH 194below, 195.Xr termcap 5 , 196and 197.Xr termcap 3 . 198.It Ev TERMPATH 199A sequence of pathnames of termcap files, separated by colons or spaces, 200which are searched for terminal descriptions in the order listed. 201Having no 202.Ev TERMPATH 203is equivalent to a 204.Ev TERMPATH 205of 206.Dq Pa $HOME/.termcap:/usr/share/misc/termcap . 207.Ev TERMPATH 208is ignored if 209.Ev TERMCAP 210contains a full pathname. 211.It Ev TIMEFORMAT 212A 213.Xr strftime 3 214format string that may be used by programs such as 215.Xr dump 8 216for formatting timestamps. 217.It Ev TMPDIR 218The directory in which to store temporary files. 219Most applications use either 220.Pa /tmp 221or 222.Pa /var/tmp . 223Setting this variable will make them use another directory. 224.It Ev TZ 225The timezone to use when displaying dates. 226The normal format is a pathname relative to 227.Pa /usr/share/zoneinfo . 228For example, the command 229.Ic env TZ=US/Pacific date 230displays the current time in California. 231See 232.Xr tzset 3 233for more information. 234.It Ev USER 235The login name of the user. 236.El 237.Pp 238Further names may be placed in the environment by the 239.Ic export 240command and 241.Ar name=value 242arguments in 243.Xr sh 1 , 244or by the 245.Ic setenv 246command if you use 247.Xr csh 1 . 248It is unwise to change certain 249.Xr sh 1 250variables that are frequently exported by 251.Pa .profile 252files, such as 253.Ev MAIL , 254.Ev PS1 , 255.Ev PS2 , 256and 257.Ev IFS , 258unless you know what you are doing. 259.Sh SEE ALSO 260.Xr audioctl 1 , 261.Xr audioplay 1 , 262.Xr audiorecord 1 , 263.Xr csh 1 , 264.Xr ex 1 , 265.Xr login 1 , 266.Xr man 1 , 267.Xr more 1 , 268.Xr sh 1 , 269.Xr execve 2 , 270.Xr _DIAGASSERT 3 , 271.Xr execle 3 , 272.Xr malloc 3 , 273.Xr rcmd 3 , 274.Xr system 3 , 275.Xr termcap 3 , 276.Xr audio 4 , 277.Xr termcap 5 , 278.Xr nls 7 , 279.Xr dump 8 280.Sh HISTORY 281The 282.Nm 283manual page appeared in 284.Bx 4.2 . 285