1.\" Copyright (c) 1983, 1990 The Regents of the University of California. 2.\" 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 6.6 (Berkeley) 7/19/91 33.\" 34.Dd July 19, 1991 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 Fl 51.It Ev EXINIT 52A startup list of commands read by 53.Xr ex 1 , 54.Xr edit 1 , 55and 56.Xr vi 1 . 57.It Ev HOME 58A user's login directory, set by 59.Xr login 1 60from the password file 61.Xr passwd 5 . 62.It Ev PATH 63The sequence of directories, separated by colons, searched by 64.Xr csh 1 , 65.Xr sh 1 , 66.Xr system 3 , 67.Xr execvp 3 , 68etc, when looking for an executable file. 69PATH is set to ``:/usr/ucb:/bin:/usr/bin'' initially by 70.Xr login 1 . 71.It Ev PRINTER 72The name of the default printer to be used by 73.Xr lpr 1 , 74.Xr lpq 1 , 75and 76.Xr lprm 1 . 77.It Ev SHELL 78The full pathname of the user's login shell. 79.It Ev TERM 80The kind of terminal for which output is to be prepared. 81This information is used by commands, such as 82.Xr nroff 1 83or 84.Xr plot 1 85which may exploit special terminal capabilities. See 86.Pa /usr/share/misc/termcap 87.Pq Xr tmercap 5 88for a list of terminal types. 89.It Ev TERMCAP 90The string describing the terminal in TERM, or, if 91it begins with a '/', the name of the termcap file. 92See 93.Ev TERMPATH 94below, 95.Xr termcap 5 , 96and 97.Xr termcap . 98.It Ev TERMPATH 99A sequence of pathnames of termcap files, separated by colons or spaces, 100which are searched for terminal descriptions in the order listed. Having 101no 102.Ev TERMPATH 103is equivalent to a 104.Ev TERMPATH 105of 106.Dq Pa $HOME/.termcap:/etc/termcap . 107.Ev TERMPATH 108is ignored if 109.Ev TERMCAP 110contains a full pathname. 111.It Ev USER 112The login name of the user. 113.El 114.Pp 115Further names may be placed in the environment by the 116.Xr export 117command and 118.Ar name=value 119arguments in 120.Xr sh 1 , 121or by the 122.Xr setenv 123command if you use 124.Xr csh 1 . 125It is unwise to change certain 126.Xr sh 1 127variables that are frequently exported by 128.Pa .profile 129files, such as 130.Ev MAIL , 131.Ev PS1 , 132.Ev PS2 , 133and 134.Ev IFS , 135unless you know what you are doing. 136.Sh SEE ALSO 137.Xr csh 1 , 138.Xr ex 1 , 139.Xr login 1 , 140.Xr sh 1 , 141.Xr execve 2 , 142.Xr execle 3 , 143.Xr system 3 , 144.Xr termcap 3 , 145.Xr termcap 5 146.Sh HISTORY 147The 148.Nm environ 149manual page appeared in 150.Bx 4.2 . 151