1.\" Copyright (c) 1983, 1990, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 2. Redistributions in binary form must reproduce the above copyright 10.\" notice, this list of conditions and the following disclaimer in the 11.\" documentation and/or other materials provided with the distribution. 12.\" 3. All advertising materials mentioning features or use of this software 13.\" must display the following acknowledgement: 14.\" This product includes software developed by the University of 15.\" California, Berkeley and its contributors. 16.\" 4. Neither the name of the University nor the names of its contributors 17.\" may be used to endorse or promote products derived from this software 18.\" without specific prior written permission. 19.\" 20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" @(#)environ.7 8.3 (Berkeley) 4/19/94 33.\" 34.Dd April 19, 1994 35.Dt ENVIRON 7 36.Os BSD 4.2 37.Sh NAME 38.Nm environ 39.Nd user environment 40.Sh SYNOPSIS 41.Ar extern char **environ ; 42.Sh DESCRIPTION 43An array of strings called the 44.Ar environment 45is made available by 46.Xr execve 2 47when a process begins. By convention these strings have the form 48.Dq Ar name=value . 49The following names are used by various commands: 50.Bl -tag -width BLOCKSIZE 51.It Ev BLOCKSIZE 52The size of the block units used by several commands, most notably 53.Xr df 1 , 54.Xr du 1 55and 56.Xr ls 1 . 57BLOCKSIZE may be specified in units of a byte by specifying a number, 58in units of a kilobyte by specifying a number followed by ``K'' or 59``k'', in units of a megabyte by specifying a number followed by ``M'' 60or ``m'' and in units of a gigabyte by specifying a number followed 61by ``G'' or ``g''. 62Sizes less than 512 bytes or greater than a gigabyte are ignored. 63.It Ev EXINIT 64A startup list of commands read by 65.Xr ex 1 , 66.Xr edit 1 , 67and 68.Xr vi 1 . 69.It Ev HOME 70A user's login directory, set by 71.Xr login 1 72from the password file 73.Xr passwd 5 . 74.It Ev LANG 75This variable configure all programs which use 76.Xr \%setlocale 3 77to specified locale. 78.It Ev PATH 79The sequence of directories, separated by colons, searched by 80.Xr csh 1 , 81.Xr sh 1 , 82.Xr system 3 , 83.Xr execvp 3 , 84etc, when looking for an executable file. 85PATH is set to ``/usr/bin:/bin'' initially by 86.Xr login 1 . 87.It Ev PRINTER 88The name of the default printer to be used by 89.Xr lpr 1 , 90.Xr lpq 1 , 91and 92.Xr lprm 1 . 93.It Ev SHELL 94The full pathname of the user's login shell. 95.It Ev TERM 96The kind of terminal for which output is to be prepared. 97This information is used by commands, such as 98.Xr nroff 1 99or 100.Xr plot 1 101which may exploit special terminal capabilities. See 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 . 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. Having 117no 118.Ev TERMPATH 119is equivalent to a 120.Ev TERMPATH 121of 122.Dq Pa $HOME/.termcap:/etc/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.Dq /tmp 131or 132.Dq /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.Dq /usr/share/zoneinfo . 138For example, the command 139.Dq 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.Xr export 150command and 151.Ar name=value 152arguments in 153.Xr sh 1 , 154or by the 155.Xr 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 setlocale 3 , 177.Xr system 3 , 178.Xr termcap 3 , 179.Xr termcap 5 180.Sh HISTORY 181The 182.Nm environ 183manual page appeared in 184.Bx 4.2 . 185