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.\" $FreeBSD$ 34.\" 35.Dd April 19, 1994 36.Dt ENVIRON 7 37.Os BSD 4.2 38.Sh NAME 39.Nm environ 40.Nd user environment 41.Sh SYNOPSIS 42.Ar extern char **environ ; 43.Sh DESCRIPTION 44An array of strings called the 45.Ar environment 46is made available by 47.Xr execve 2 48when a process begins. By convention these strings have the form 49.Dq Ar name=value . 50The following names are used by various commands: 51.Bl -tag -width BLOCKSIZE 52.It Ev BLOCKSIZE 53The size of the block units used by several commands, most notably 54.Xr df 1 , 55.Xr du 1 56and 57.Xr ls 1 . 58.Ev BLOCKSIZE 59may be specified in units of a byte by specifying a number, 60in units of a kilobyte by specifying a number followed by ``K'' or 61``k'', in units of a megabyte by specifying a number followed by ``M'' 62or ``m'' and in units of a gigabyte by specifying a number followed 63by ``G'' or ``g''. 64Sizes less than 512 bytes or greater than a gigabyte are ignored. 65.It Ev EDITOR 66Default editor name. 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 LANG 78This variable configures all programs which use 79.Xr setlocale 3 80to use the specified locale. 81.It Ev MAIL 82The location of the user's 83mailbox instead of the default in /var/mail, 84used by 85.Xr mail 1 , 86.Xr sh 1 , 87and many other mailclients. 88.It Ev PAGER 89Default paginator program. The program specified by this variable is used by 90.Xr mail 1 , 91.Xr man 1 , 92.Xr ftp 1 , 93etc, to display information which is longer than the current display. 94.It Ev PATH 95The sequence of directories, separated by colons, searched by 96.Xr csh 1 , 97.Xr sh 1 , 98.Xr system 3 , 99.Xr execvp 3 , 100etc, when looking for an executable file. 101.Ev PATH 102is set to ``/usr/bin:/bin'' initially by 103.Xr login 1 . 104.It Ev PRINTER 105The name of the default printer to be used by 106.Xr lpr 1 , 107.Xr lpq 1 , 108and 109.Xr lprm 1 . 110.It Ev PWD 111The current directory pathname. 112.It Ev SHELL 113The full pathname of the user's login shell. 114.It Ev TERM 115The kind of terminal for which output is to be prepared. 116This information is used by commands, such as 117.Xr nroff 1 118or 119.Xr plot 1 120which may exploit special terminal capabilities. See 121.Pa /usr/share/misc/termcap 122.Pq Xr termcap 5 123for a list of terminal types. 124.It Ev TERMCAP 125The string describing the terminal in 126.Ev TERM , 127or, if 128it begins with a '/', the name of the termcap file. 129See 130.Ev TERMPATH 131below, and 132.Xr termcap 5 . 133.It Ev TERMPATH 134A sequence of pathnames of termcap files, separated by colons or spaces, 135which are searched for terminal descriptions in the order listed. Having 136no 137.Ev TERMPATH 138is equivalent to a 139.Ev TERMPATH 140of 141.Dq Pa $HOME/.termcap:/etc/termcap . 142.Ev TERMPATH 143is ignored if 144.Ev TERMCAP 145contains a full pathname. 146.It Ev TMPDIR 147The directory in which to store temporary files. 148Most applications use either 149.Dq /tmp 150or 151.Dq /var/tmp . 152Setting this variable will make them use another directory. 153.It Ev TZ 154The timezone to use when displaying dates. 155The normal format is a pathname relative to 156.Dq Pa /usr/share/zoneinfo . 157For example, the command 158.Dq env TZ=America/Los_Angeles date 159displays the current time in California. 160See 161.Xr tzset 3 162for more information. 163.It Ev USER 164The login name of the user. 165.El 166.Pp 167Further names may be placed in the environment by the 168.Xr export 169command and 170.Ar name=value 171arguments in 172.Xr sh 1 , 173or by the 174.Xr setenv 175command if you use 176.Xr csh 1 . 177It is unwise to change certain 178.Xr sh 1 179variables that are frequently exported by 180.Pa .profile 181files, such as 182.Ev MAIL , 183.Ev PS1 , 184.Ev PS2 , 185and 186.Ev IFS , 187unless you know what you are doing. 188.Sh SEE ALSO 189.Xr cd 1 , 190.Xr csh 1 , 191.Xr ex 1 , 192.Xr login 1 , 193.Xr sh 1 , 194.Xr execve 2 , 195.Xr execle 3 , 196.Xr setlocale 3 , 197.Xr system 3 , 198.Xr termcap 3 , 199.Xr termcap 5 200.Sh HISTORY 201The 202.Nm environ 203manual page appeared in 204.Bx 4.2 . 205