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