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 12, 2003 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 LC_MONETARY 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 unless the 91.Ev LC_* 92variables are set. 93.It Ev LC_ALL 94Overrides the values of 95.Ev LC_COLLATE , 96.Ev LC_CTYPE , 97.Ev LC_MESSAGES , 98.Ev LC_MONETARY , 99.Ev LC_NUMERIC , 100.Ev LC_TIME 101and 102.Ev LANG . 103.It Ev LC_COLLATE 104Locale to be used for ordering of strings. 105.It Ev LC_CTYPE 106Locale to be used for character classification 107(letter, space, digit, etc.) and for interpreting byte sequences as 108multibyte characters. 109.It Ev LC_MESSAGES 110Locale to be used for diagnostic messages. 111.It Ev LC_MONETARY 112Locale to be used for interpreting monetary input 113and formatting output. 114.It Ev LC_NUMERIC 115Locale to be used for interpreting numeric input and 116formatting output. 117.It Ev LC_TIME 118Locale to be used for interpreting dates input and 119for formatting output. 120.It Ev MAIL 121The location of the user's 122mailbox instead of the default in /var/mail, 123used by 124.Xr mail 1 , 125.Xr sh 1 , 126and many other mailclients. 127.It Ev NLSPATH 128List of directories to be searched for the message catalog referred to by 129.Ev LC_MESSAGES . 130See 131.Xr catopen 3 . 132.It Ev PAGER 133Default paginator program. The program specified by this variable is used by 134.Xr mail 1 , 135.Xr man 1 , 136.Xr ftp 1 , 137etc, to display information which is longer than the current display. 138.It Ev PATH 139The sequence of directories, separated by colons, searched by 140.Xr csh 1 , 141.Xr sh 1 , 142.Xr system 3 , 143.Xr execvp 3 , 144etc, when looking for an executable file. 145.Ev PATH 146is set to ``/usr/bin:/bin'' initially by 147.Xr login 1 . 148.It Ev PRINTER 149The name of the default printer to be used by 150.Xr lpr 1 , 151.Xr lpq 1 , 152and 153.Xr lprm 1 . 154.It Ev PWD 155The current directory pathname. 156.It Ev SHELL 157The full pathname of the user's login shell. 158.It Ev TERM 159The kind of terminal for which output is to be prepared. 160This information is used by commands, such as 161.Xr nroff 1 162or 163.Xr plot 1 164which may exploit special terminal capabilities. See 165.Pa /usr/share/misc/termcap 166.Pq Xr termcap 5 167for a list of terminal types. 168.It Ev TERMCAP 169The string describing the terminal in 170.Ev TERM , 171or, if 172it begins with a '/', the name of the termcap file. 173See 174.Ev TERMPATH 175below, and 176.Xr termcap 5 . 177.It Ev TERMPATH 178A sequence of pathnames of termcap files, separated by colons or spaces, 179which are searched for terminal descriptions in the order listed. Having 180no 181.Ev TERMPATH 182is equivalent to a 183.Ev TERMPATH 184of 185.Dq Pa $HOME/.termcap:/etc/termcap . 186.Ev TERMPATH 187is ignored if 188.Ev TERMCAP 189contains a full pathname. 190.It Ev TMPDIR 191The directory in which to store temporary files. 192Most applications use either 193.Dq /tmp 194or 195.Dq /var/tmp . 196Setting this variable will make them use another directory. 197.It Ev TZ 198The timezone to use when displaying dates. 199The normal format is a pathname relative to 200.Dq Pa /usr/share/zoneinfo . 201For example, the command 202.Dq env TZ=America/Los_Angeles date 203displays the current time in California. 204See 205.Xr tzset 3 206for more information. 207.It Ev USER 208The login name of the user. 209.El 210.Pp 211Further names may be placed in the environment by the 212.Ic export 213command and 214.Ar name=value 215arguments in 216.Xr sh 1 , 217or by the 218.Ic setenv 219command if you use 220.Xr csh 1 . 221It is unwise to change certain 222.Xr sh 1 223variables that are frequently exported by 224.Pa .profile 225files, such as 226.Ev MAIL , 227.Ev PS1 , 228.Ev PS2 , 229and 230.Ev IFS , 231unless you know what you are doing. 232.Sh SEE ALSO 233.Xr cd 1 , 234.Xr csh 1 , 235.Xr env 1 , 236.Xr ex 1 , 237.Xr login 1 , 238.Xr sh 1 , 239.Xr execve 2 , 240.Xr execle 3 , 241.Xr getenv 3 , 242.Xr setenv 3 , 243.Xr setlocale 3 , 244.Xr system 3 , 245.Xr termcap 3 , 246.Xr termcap 5 247.Sh HISTORY 248The 249.Nm 250manual page appeared in 251.Bx 4.2 . 252