1.\" $NetBSD: environ.7,v 1.7 1999/03/15 08:22:20 garbled 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 19, 1994 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 BLOCKSIZE 54.It Ev BLOCKSIZE 55The size of the block units used by several commands, most notably 56.Xr df 1 , 57.Xr du 1 58and 59.Xr ls 1 . 60.Ev BLOCKSIZE 61may be specified in units of a byte by specifying a number, 62in units of a kilobyte by specifying a number followed by ``K'' or 63``k'', in units of a megabyte by specifying a number followed by ``M'' 64or ``m'' and in units of a gigabyte by specifying a number followed 65by ``G'' or ``g''. 66Sizes less than 512 bytes or greater than a gigabyte are ignored. 67.It Ev EXINIT 68A startup list of commands read by 69.Xr ex 1 70and 71.Xr vi 1 . 72.It Ev HOME 73A user's login directory, set by 74.Xr login 1 75from the password file 76.Xr passwd 5 . 77.It Ev PATH 78The sequence of directories, separated by colons, searched by 79.Xr csh 1 , 80.Xr sh 1 , 81.Xr system 3 , 82.Xr execvp 3 , 83etc, when looking for an executable file. 84PATH is set to ``/usr/bin:/bin'' initially by 85.Xr login 1 . 86.It Ev PRINTER 87The name of the default printer to be used by 88.Xr lpr 1 , 89.Xr lpq 1 , 90and 91.Xr lprm 1 . 92.It Ev SHELL 93The full pathname of the user's login shell. 94.It Ev TERM 95The kind of terminal for which output is to be prepared. 96This information is used by commands, such as 97.Xr nroff 1 98or 99.Xr plot 1 100which may exploit special terminal capabilities. 101See 102.Pa /usr/share/misc/termcap 103.Pq Xr termcap 5 104for a list of terminal types. 105.It Ev TERMCAP 106The string describing the terminal in TERM, or, if 107it begins with a '/', the name of the termcap file. 108See 109.Ev TERMPATH 110below, 111.Xr termcap 5 , 112and 113.Xr termcap 3 . 114.It Ev TERMPATH 115A sequence of pathnames of termcap files, separated by colons or spaces, 116which are searched for terminal descriptions in the order listed. 117Having no 118.Ev TERMPATH 119is equivalent to a 120.Ev TERMPATH 121of 122.Dq Pa $HOME/.termcap:/usr/share/misc/termcap . 123.Ev TERMPATH 124is ignored if 125.Ev TERMCAP 126contains a full pathname. 127.It Ev TMPDIR 128The directory in which to store temporary files. 129Most applications use either 130.Pa /tmp 131or 132.Pa /var/tmp . 133Setting this variable will make them use another directory. 134.It Ev TZ 135The timezone to use when displaying dates. 136The normal format is a pathname relative to 137.Pa /usr/share/zoneinfo . 138For example, the command 139.Ic env TZ=US/Pacific date 140displays the current time in California. 141See 142.Xr tzset 3 143for more information. 144.It Ev USER 145The login name of the user. 146.El 147.Pp 148Further names may be placed in the environment by the 149.Ic export 150command and 151.Ar name=value 152arguments in 153.Xr sh 1 , 154or by the 155.Ic setenv 156command if you use 157.Xr csh 1 . 158It is unwise to change certain 159.Xr sh 1 160variables that are frequently exported by 161.Pa .profile 162files, such as 163.Ev MAIL , 164.Ev PS1 , 165.Ev PS2 , 166and 167.Ev IFS , 168unless you know what you are doing. 169.Sh SEE ALSO 170.Xr csh 1 , 171.Xr ex 1 , 172.Xr login 1 , 173.Xr sh 1 , 174.Xr execve 2 , 175.Xr execle 3 , 176.Xr system 3 , 177.Xr termcap 3 , 178.Xr termcap 5 179.Sh HISTORY 180The 181.Nm 182manual page appeared in 183.Bx 4.2 . 184