Annotation of src/share/man/man7/environ.7, Revision 1.21
1.21 ! kleink 1: .\" $NetBSD: environ.7,v 1.20 2003/08/07 10:31:20 agc Exp $
1.3 jtc 2: .\"
3: .\" Copyright (c) 1983, 1990, 1993
4: .\" The Regents of the University of California. All rights reserved.
1.1 cgd 5: .\"
6: .\" Redistribution and use in source and binary forms, with or without
7: .\" modification, are permitted provided that the following conditions
8: .\" are met:
9: .\" 1. Redistributions of source code must retain the above copyright
10: .\" notice, this list of conditions and the following disclaimer.
11: .\" 2. Redistributions in binary form must reproduce the above copyright
12: .\" notice, this list of conditions and the following disclaimer in the
13: .\" documentation and/or other materials provided with the distribution.
1.20 agc 14: .\" 3. Neither the name of the University nor the names of its contributors
1.1 cgd 15: .\" may be used to endorse or promote products derived from this software
16: .\" without specific prior written permission.
17: .\"
18: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21: .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28: .\" SUCH DAMAGE.
29: .\"
1.3 jtc 30: .\" @(#)environ.7 8.3 (Berkeley) 4/19/94
1.1 cgd 31: .\"
1.21 ! kleink 32: .Dd July 5, 2005
1.1 cgd 33: .Dt ENVIRON 7
1.7 garbled 34: .Os
1.1 cgd 35: .Sh NAME
36: .Nm environ
1.6 fair 37: .Nd user process environment
1.1 cgd 38: .Sh SYNOPSIS
39: .Ar extern char **environ ;
40: .Sh DESCRIPTION
41: An array of strings called the
1.6 fair 42: .Em environment
1.1 cgd 43: is made available by
1.6 fair 44: .Xr execve 2
45: when a process begins.
46: By convention these strings have the form
1.1 cgd 47: .Dq Ar name=value .
48: The following names are used by various commands:
1.10 lukem 49: .Bl -tag -width LIBC_DIAGASSERT
1.8 kleink 50: .It Ev AUDIOCTLDEVICE
51: The name of the audio control device to be used by
52: .Xr audioctl 1 ,
53: .Xr audioplay 1
54: and
55: .Xr audiorecord 1 .
56: .It Ev AUDIODEVICE
57: The name of the audio device to be used by
58: .Xr audioplay 1
59: and
60: .Xr audiorecord 1 .
1.3 jtc 61: .It Ev BLOCKSIZE
62: The size of the block units used by several commands, most notably
63: .Xr df 1 ,
64: .Xr du 1
65: and
66: .Xr ls 1 .
1.6 fair 67: .Ev BLOCKSIZE
68: may be specified in units of a byte by specifying a number,
1.9 enami 69: in units of a kilobyte by specifying a number followed by
70: .Dq K
71: or
72: .Dq k ,
73: in units of a megabyte by specifying a number followed by
74: .Dq M
75: or
76: .Dq m
77: and in units of a gigabyte by specifying a number followed
78: by
79: .Dq G
80: or
81: .Dq g .
1.3 jtc 82: Sizes less than 512 bytes or greater than a gigabyte are ignored.
1.1 cgd 83: .It Ev EXINIT
84: A startup list of commands read by
1.6 fair 85: .Xr ex 1
1.1 cgd 86: and
1.6 fair 87: .Xr vi 1 .
1.1 cgd 88: .It Ev HOME
89: A user's login directory, set by
1.6 fair 90: .Xr login 1
1.1 cgd 91: from the password file
1.6 fair 92: .Xr passwd 5 .
1.18 lukem 93: .It Ev LANG
94: Default for all NLS categories.
95: Only used if
96: .Ev LC_ALL
97: or the environment variable for a particular NLS category
98: is not provided
99: .Ev ( LC_COLLATE ,
100: .Ev LC_CTYPE ,
101: .Ev LC_MESSAGES ,
102: .Ev LC_MONETARY ,
103: .Ev LC_NUMERIC ,
104: or
105: .Ev LC_TIME ) .
106: .It Ev LC_ALL
107: Override for all NLS categories.
108: If set, overrides the values of
109: .Ev LC_COLLATE ,
110: .Ev LC_CTYPE ,
111: .Ev LC_MESSAGES ,
112: .Ev LC_MONETARY ,
113: .Ev LC_NUMERIC ,
114: and
115: .Ev LC_TIME .
116: .It Ev LC_COLLATE
117: NLS string-collation order information.
118: .It Ev LC_CTYPE
119: NLS character classification, case conversion, and other character attributes.
120: .It Ev LC_MESSAGES
121: NLS format for affirmative and negative responses.
122: .It Ev LC_MONETARY
123: NLS rules and symbols for formatting monetary numeric information.
124: .It Ev LC_NUMERIC
125: NLS rules and symbols for formatting nonmonetary numeric information.
126: .It Ev LC_TIME
127: NLS rules and symbols for formatting time and date information.
1.10 lukem 128: .It Ev LIBC_DIAGASSERT
129: Control how the
130: .Fn _DIAGASSERT
131: macro (from
1.19 wiz 132: .Aq Pa assert.h )
1.10 lukem 133: behaves once the assertion is raised.
134: Refer to
135: .Xr _DIAGASSERT 3
136: for more information.
1.21 ! kleink 137: .It Ev LOGNAME
! 138: The login name of the user.
1.10 lukem 139: .It Ev MALLOC_OPTIONS
140: Control the behaviour of the
141: .Fn malloc
142: function.
143: Refer to
144: .Xr malloc 3
145: for more information.
1.8 kleink 146: .It Ev MIXERDEVICE
147: The name of the audio mixer device to be used by
148: .Xr mixerctl 1 .
1.15 perry 149: .It Ev PAGER
150: The program used for paginating the output of several commands
151: such as
152: .Xr man 1 .
153: If null or not set, the standard pagination program
154: .Xr more 1
155: will be used.
1.1 cgd 156: .It Ev PATH
157: The sequence of directories, separated by colons, searched by
1.6 fair 158: .Xr csh 1 ,
159: .Xr sh 1 ,
160: .Xr system 3 ,
161: .Xr execvp 3 ,
1.1 cgd 162: etc, when looking for an executable file.
1.9 enami 163: PATH is set to
164: .Dq /usr/bin:/bin:/usr/pkg/bin:/usr/local/bin
165: initially by
1.6 fair 166: .Xr login 1 .
1.1 cgd 167: .It Ev PRINTER
168: The name of the default printer to be used by
1.6 fair 169: .Xr lpr 1 ,
170: .Xr lpq 1 ,
1.1 cgd 171: and
1.6 fair 172: .Xr lprm 1 .
1.17 lukem 173: .It Ev RCMD_CMD
174: When using the
175: .Xr rcmd 3
176: function, this variable is used as the program to run instead of
177: .Xr rcmd 1 .
1.1 cgd 178: .It Ev SHELL
179: The full pathname of the user's login shell.
180: .It Ev TERM
181: The kind of terminal for which output is to be prepared.
182: This information is used by commands, such as
1.6 fair 183: .Xr nroff 1
1.14 wiz 184: .\" or
185: .\" .Xr plot 1
1.6 fair 186: which may exploit special terminal capabilities.
187: See
1.1 cgd 188: .Pa /usr/share/misc/termcap
1.3 jtc 189: .Pq Xr termcap 5
1.1 cgd 190: for a list of terminal types.
191: .It Ev TERMCAP
192: The string describing the terminal in TERM, or, if
193: it begins with a '/', the name of the termcap file.
194: See
195: .Ev TERMPATH
196: below,
1.6 fair 197: .Xr termcap 5 ,
1.1 cgd 198: and
1.6 fair 199: .Xr termcap 3 .
1.1 cgd 200: .It Ev TERMPATH
201: A sequence of pathnames of termcap files, separated by colons or spaces,
1.6 fair 202: which are searched for terminal descriptions in the order listed.
203: Having no
1.1 cgd 204: .Ev TERMPATH
205: is equivalent to a
206: .Ev TERMPATH
207: of
1.5 mikel 208: .Dq Pa $HOME/.termcap:/usr/share/misc/termcap .
1.1 cgd 209: .Ev TERMPATH
210: is ignored if
211: .Ev TERMCAP
212: contains a full pathname.
1.11 blymn 213: .It Ev TIMEFORMAT
214: A
215: .Xr strftime 3
1.12 wiz 216: format string that may be used by programs such as
1.11 blymn 217: .Xr dump 8
218: for formatting timestamps.
1.3 jtc 219: .It Ev TMPDIR
220: The directory in which to store temporary files.
221: Most applications use either
1.6 fair 222: .Pa /tmp
1.3 jtc 223: or
1.6 fair 224: .Pa /var/tmp .
1.3 jtc 225: Setting this variable will make them use another directory.
226: .It Ev TZ
227: The timezone to use when displaying dates.
228: The normal format is a pathname relative to
1.6 fair 229: .Pa /usr/share/zoneinfo .
1.3 jtc 230: For example, the command
1.6 fair 231: .Ic env TZ=US/Pacific date
1.3 jtc 232: displays the current time in California.
233: See
234: .Xr tzset 3
235: for more information.
1.1 cgd 236: .It Ev USER
237: The login name of the user.
1.21 ! kleink 238: It is recommended that portable applications use
! 239: .Ev LOGNAME
! 240: instead.
1.1 cgd 241: .El
242: .Pp
243: Further names may be placed in the environment by the
1.6 fair 244: .Ic export
1.1 cgd 245: command and
246: .Ar name=value
247: arguments in
1.6 fair 248: .Xr sh 1 ,
1.1 cgd 249: or by the
1.6 fair 250: .Ic setenv
1.1 cgd 251: command if you use
1.6 fair 252: .Xr csh 1 .
1.1 cgd 253: It is unwise to change certain
1.6 fair 254: .Xr sh 1
1.1 cgd 255: variables that are frequently exported by
256: .Pa .profile
257: files, such as
258: .Ev MAIL ,
259: .Ev PS1 ,
260: .Ev PS2 ,
261: and
262: .Ev IFS ,
263: unless you know what you are doing.
264: .Sh SEE ALSO
1.8 kleink 265: .Xr audioctl 1 ,
266: .Xr audioplay 1 ,
267: .Xr audiorecord 1 ,
1.1 cgd 268: .Xr csh 1 ,
269: .Xr ex 1 ,
270: .Xr login 1 ,
1.15 perry 271: .Xr man 1 ,
272: .Xr more 1 ,
1.1 cgd 273: .Xr sh 1 ,
274: .Xr execve 2 ,
1.10 lukem 275: .Xr _DIAGASSERT 3 ,
1.1 cgd 276: .Xr execle 3 ,
1.10 lukem 277: .Xr malloc 3 ,
1.17 lukem 278: .Xr rcmd 3 ,
1.1 cgd 279: .Xr system 3 ,
280: .Xr termcap 3 ,
1.8 kleink 281: .Xr audio 4 ,
1.11 blymn 282: .Xr termcap 5 ,
1.18 lukem 283: .Xr nls 7 ,
1.11 blymn 284: .Xr dump 8
1.1 cgd 285: .Sh HISTORY
286: The
1.6 fair 287: .Nm
1.1 cgd 288: manual page appeared in
289: .Bx 4.2 .
CVSweb <webmaster@jp.NetBSD.org>