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 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 COLUMNS 66The user's preferred width in column positions for the terminal. 67Utilities such as 68.Xr ls 1 69and 70.Xr who 1 71use this to format output into columns. 72If unset or empty, utilities will use an 73.Xr ioctl 2 74call to ask the terminal driver for the width. 75.It Ev EDITOR 76Default editor name. 77.It Ev EXINIT 78A startup list of commands read by 79.Xr ex 1 80and 81.Xr vi 1 . 82.It Ev HOME 83A user's login directory, set by 84.Xr login 1 85from the password file 86.Xr passwd 5 . 87.It Ev LANG 88This variable configures all programs which use 89.Xr setlocale 3 90to use the specified locale. 91.It Ev MAIL 92The location of the user's 93mailbox instead of the default in /var/mail, 94used by 95.Xr mail 1 , 96.Xr sh 1 , 97and many other mailclients. 98.It Ev PAGER 99Default paginator program. The program specified by this variable is used by 100.Xr mail 1 , 101.Xr man 1 , 102.Xr ftp 1 , 103etc, to display information which is longer than the current display. 104.It Ev PATH 105The sequence of directories, separated by colons, searched by 106.Xr csh 1 , 107.Xr sh 1 , 108.Xr system 3 , 109.Xr execvp 3 , 110etc, when looking for an executable file. 111.Ev PATH 112is set to ``/usr/bin:/bin'' initially by 113.Xr login 1 . 114.It Ev PRINTER 115The name of the default printer to be used by 116.Xr lpr 1 , 117.Xr lpq 1 , 118and 119.Xr lprm 1 . 120.It Ev PWD 121The current directory pathname. 122.It Ev SHELL 123The full pathname of the user's login shell. 124.It Ev TERM 125The kind of terminal for which output is to be prepared. 126This information is used by commands, such as 127.Xr nroff 1 128or 129.Xr plot 1 130which may exploit special terminal capabilities. See 131.Pa /usr/share/misc/termcap 132.Pq Xr termcap 5 133for a list of terminal types. 134.It Ev TERMCAP 135The string describing the terminal in 136.Ev TERM , 137or, if 138it begins with a '/', the name of the termcap file. 139See 140.Ev TERMPATH 141below, and 142.Xr termcap 5 . 143.It Ev TERMPATH 144A sequence of pathnames of termcap files, separated by colons or spaces, 145which are searched for terminal descriptions in the order listed. Having 146no 147.Ev TERMPATH 148is equivalent to a 149.Ev TERMPATH 150of 151.Dq Pa $HOME/.termcap:/etc/termcap . 152.Ev TERMPATH 153is ignored if 154.Ev TERMCAP 155contains a full pathname. 156.It Ev TMPDIR 157The directory in which to store temporary files. 158Most applications use either 159.Dq /tmp 160or 161.Dq /var/tmp . 162Setting this variable will make them use another directory. 163.It Ev TZ 164The timezone to use when displaying dates. 165The normal format is a pathname relative to 166.Dq Pa /usr/share/zoneinfo . 167For example, the command 168.Dq env TZ=America/Los_Angeles date 169displays the current time in California. 170See 171.Xr tzset 3 172for more information. 173.It Ev USER 174The login name of the user. 175.El 176.Pp 177Further names may be placed in the environment by the 178.Xr export 179command and 180.Ar name=value 181arguments in 182.Xr sh 1 , 183or by the 184.Xr setenv 185command if you use 186.Xr csh 1 . 187It is unwise to change certain 188.Xr sh 1 189variables that are frequently exported by 190.Pa .profile 191files, such as 192.Ev MAIL , 193.Ev PS1 , 194.Ev PS2 , 195and 196.Ev IFS , 197unless you know what you are doing. 198.Sh SEE ALSO 199.Xr cd 1 , 200.Xr csh 1 , 201.Xr ex 1 , 202.Xr login 1 , 203.Xr sh 1 , 204.Xr execve 2 , 205.Xr execle 3 , 206.Xr getenv 3 , 207.Xr setenv 3 , 208.Xr setlocale 3 , 209.Xr system 3 , 210.Xr termcap 3 , 211.Xr termcap 5 212.Sh HISTORY 213The 214.Nm 215manual page appeared in 216.Bx 4.2 . 217