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