xref: /freebsd/share/man/man7/environ.7 (revision 7c2aa513e682f03c94d3db50205dee36b90f094c)
1afe61c15SRodney W. Grimes.\" Copyright (c) 1983, 1990, 1993
2afe61c15SRodney W. Grimes.\"	The Regents of the University of California.  All rights reserved.
3afe61c15SRodney W. Grimes.\"
4afe61c15SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without
5afe61c15SRodney W. Grimes.\" modification, are permitted provided that the following conditions
6afe61c15SRodney W. Grimes.\" are met:
7afe61c15SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright
8afe61c15SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer.
9afe61c15SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright
10afe61c15SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer in the
11afe61c15SRodney W. Grimes.\"    documentation and/or other materials provided with the distribution.
12afe61c15SRodney W. Grimes.\" 3. All advertising materials mentioning features or use of this software
13afe61c15SRodney W. Grimes.\"    must display the following acknowledgement:
14afe61c15SRodney W. Grimes.\"	This product includes software developed by the University of
15afe61c15SRodney W. Grimes.\"	California, Berkeley and its contributors.
16afe61c15SRodney W. Grimes.\" 4. Neither the name of the University nor the names of its contributors
17afe61c15SRodney W. Grimes.\"    may be used to endorse or promote products derived from this software
18afe61c15SRodney W. Grimes.\"    without specific prior written permission.
19afe61c15SRodney W. Grimes.\"
20afe61c15SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21afe61c15SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22afe61c15SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23afe61c15SRodney W. Grimes.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24afe61c15SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25afe61c15SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26afe61c15SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27afe61c15SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28afe61c15SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29afe61c15SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30afe61c15SRodney W. Grimes.\" SUCH DAMAGE.
31afe61c15SRodney W. Grimes.\"
32afe61c15SRodney W. Grimes.\"	@(#)environ.7	8.3 (Berkeley) 4/19/94
33afe61c15SRodney W. Grimes.\"
34afe61c15SRodney W. Grimes.Dd April 19, 1994
35afe61c15SRodney W. Grimes.Dt ENVIRON 7
36afe61c15SRodney W. Grimes.Os BSD 4.2
37afe61c15SRodney W. Grimes.Sh NAME
38afe61c15SRodney W. Grimes.Nm environ
39afe61c15SRodney W. Grimes.Nd user environment
40afe61c15SRodney W. Grimes.Sh SYNOPSIS
41afe61c15SRodney W. Grimes.Ar extern char **environ ;
42afe61c15SRodney W. Grimes.Sh DESCRIPTION
43afe61c15SRodney W. GrimesAn array of strings called the
44afe61c15SRodney W. Grimes.Ar environment
45afe61c15SRodney W. Grimesis made available by
46afe61c15SRodney W. Grimes.Xr execve  2
47afe61c15SRodney W. Grimeswhen a process begins.  By convention these strings have the form
48afe61c15SRodney W. Grimes.Dq Ar name=value .
49afe61c15SRodney W. GrimesThe following names are used by various commands:
507c2aa513SAndrey A. Chernov.Bl -tag -width ENABLE_STARTUP_LOCALE
51afe61c15SRodney W. Grimes.It Ev BLOCKSIZE
52afe61c15SRodney W. GrimesThe size of the block units used by several commands, most notably
53afe61c15SRodney W. Grimes.Xr df 1 ,
54afe61c15SRodney W. Grimes.Xr du 1
55afe61c15SRodney W. Grimesand
56afe61c15SRodney W. Grimes.Xr ls 1 .
57afe61c15SRodney W. GrimesBLOCKSIZE may be specified in units of a byte by specifying a number,
58afe61c15SRodney W. Grimesin units of a kilobyte by specifying a number followed by ``K'' or
59afe61c15SRodney W. Grimes``k'', in units of a megabyte by specifying a number followed by ``M''
60afe61c15SRodney W. Grimesor ``m'' and in units of a gigabyte by specifying a number followed
61afe61c15SRodney W. Grimesby ``G'' or ``g''.
62afe61c15SRodney W. GrimesSizes less than 512 bytes or greater than a gigabyte are ignored.
637c2aa513SAndrey A. Chernov.It Ev ENABLE_STARTUP_LOCALE
647c2aa513SAndrey A. ChernovIf this variable is set (value ignored), call
657c2aa513SAndrey A. Chernov.Xr \%setlocale 3
667c2aa513SAndrey A. Chernovat program startup automatically (for 8-bits wide locales only), configuring
677c2aa513SAndrey A. Chernovprogram by
687c2aa513SAndrey A. Chernov.Ev LANG
697c2aa513SAndrey A. Chernovvariable or
707c2aa513SAndrey A. Chernov.Ev LC_*
717c2aa513SAndrey A. Chernovvariables at very beginning.
72afe61c15SRodney W. Grimes.It Ev EXINIT
73afe61c15SRodney W. GrimesA startup list of commands read by
74afe61c15SRodney W. Grimes.Xr ex  1  ,
75afe61c15SRodney W. Grimes.Xr edit  1 ,
76afe61c15SRodney W. Grimesand
77afe61c15SRodney W. Grimes.Xr vi  1  .
78afe61c15SRodney W. Grimes.It Ev HOME
79afe61c15SRodney W. GrimesA user's login directory, set by
80afe61c15SRodney W. Grimes.Xr login  1
81afe61c15SRodney W. Grimesfrom the password file
82afe61c15SRodney W. Grimes.Xr passwd  5  .
83afe61c15SRodney W. Grimes.It Ev PATH
84afe61c15SRodney W. GrimesThe sequence of directories, separated by colons, searched by
85afe61c15SRodney W. Grimes.Xr csh  1  ,
86afe61c15SRodney W. Grimes.Xr sh  1 ,
87afe61c15SRodney W. Grimes.Xr system  3  ,
88afe61c15SRodney W. Grimes.Xr execvp  3 ,
89afe61c15SRodney W. Grimesetc, when looking for an executable file.
90278e8747SBruce EvansPATH is set to ``/usr/bin:/bin'' initially by
91afe61c15SRodney W. Grimes.Xr login  1  .
92afe61c15SRodney W. Grimes.It Ev PRINTER
93afe61c15SRodney W. GrimesThe name of the default printer to be used by
94afe61c15SRodney W. Grimes.Xr lpr  1  ,
95afe61c15SRodney W. Grimes.Xr lpq  1 ,
96afe61c15SRodney W. Grimesand
97afe61c15SRodney W. Grimes.Xr lprm  1  .
98afe61c15SRodney W. Grimes.It Ev SHELL
99afe61c15SRodney W. GrimesThe full pathname of the user's login shell.
100afe61c15SRodney W. Grimes.It Ev TERM
101afe61c15SRodney W. GrimesThe kind of terminal for which output is to be prepared.
102afe61c15SRodney W. GrimesThis information is used by commands, such as
103afe61c15SRodney W. Grimes.Xr nroff  1
104afe61c15SRodney W. Grimesor
105afe61c15SRodney W. Grimes.Xr plot 1
106afe61c15SRodney W. Grimeswhich may exploit special terminal capabilities.  See
107afe61c15SRodney W. Grimes.Pa /usr/share/misc/termcap
108afe61c15SRodney W. Grimes.Pq Xr termcap 5
109afe61c15SRodney W. Grimesfor a list of terminal types.
110afe61c15SRodney W. Grimes.It Ev TERMCAP
111afe61c15SRodney W. GrimesThe string describing the terminal in TERM, or, if
112afe61c15SRodney W. Grimesit begins with a '/', the name of the termcap file.
113afe61c15SRodney W. GrimesSee
114afe61c15SRodney W. Grimes.Ev TERMPATH
115afe61c15SRodney W. Grimesbelow,
116afe61c15SRodney W. Grimes.Xr termcap  5  ,
117afe61c15SRodney W. Grimesand
118afe61c15SRodney W. Grimes.Xr termcap  .
119afe61c15SRodney W. Grimes.It Ev TERMPATH
120afe61c15SRodney W. GrimesA sequence of pathnames of termcap files, separated by colons or spaces,
121afe61c15SRodney W. Grimeswhich are searched for terminal descriptions in the order listed.  Having
122afe61c15SRodney W. Grimesno
123afe61c15SRodney W. Grimes.Ev TERMPATH
124afe61c15SRodney W. Grimesis equivalent to a
125afe61c15SRodney W. Grimes.Ev TERMPATH
126afe61c15SRodney W. Grimesof
127afe61c15SRodney W. Grimes.Dq Pa $HOME/.termcap:/etc/termcap .
128afe61c15SRodney W. Grimes.Ev TERMPATH
129afe61c15SRodney W. Grimesis ignored if
130afe61c15SRodney W. Grimes.Ev TERMCAP
131afe61c15SRodney W. Grimescontains a full pathname.
132afe61c15SRodney W. Grimes.It Ev TMPDIR
133afe61c15SRodney W. GrimesThe directory in which to store temporary files.
134afe61c15SRodney W. GrimesMost applications use either
135afe61c15SRodney W. Grimes.Dq /tmp
136afe61c15SRodney W. Grimesor
137afe61c15SRodney W. Grimes.Dq /var/tmp .
138afe61c15SRodney W. GrimesSetting this variable will make them use another directory.
139afe61c15SRodney W. Grimes.It Ev TZ
140afe61c15SRodney W. GrimesThe timezone to use when displaying dates.
141afe61c15SRodney W. GrimesThe normal format is a pathname relative to
142afe61c15SRodney W. Grimes.Dq /usr/share/zoneinfo .
143afe61c15SRodney W. GrimesFor example, the command
144afe61c15SRodney W. Grimes.Dq env TZ=US/Pacific date
145afe61c15SRodney W. Grimesdisplays the current time in California.
146afe61c15SRodney W. GrimesSee
147afe61c15SRodney W. Grimes.Xr tzset 3
148afe61c15SRodney W. Grimesfor more information.
149afe61c15SRodney W. Grimes.It Ev USER
150afe61c15SRodney W. GrimesThe login name of the user.
151afe61c15SRodney W. Grimes.El
152afe61c15SRodney W. Grimes.Pp
153afe61c15SRodney W. GrimesFurther names may be placed in the environment by the
154afe61c15SRodney W. Grimes.Xr export
155afe61c15SRodney W. Grimescommand and
156afe61c15SRodney W. Grimes.Ar name=value
157afe61c15SRodney W. Grimesarguments in
158afe61c15SRodney W. Grimes.Xr sh  1  ,
159afe61c15SRodney W. Grimesor by the
160afe61c15SRodney W. Grimes.Xr setenv
161afe61c15SRodney W. Grimescommand if you use
162afe61c15SRodney W. Grimes.Xr csh  1  .
163afe61c15SRodney W. GrimesIt is unwise to change certain
164afe61c15SRodney W. Grimes.Xr sh  1
165afe61c15SRodney W. Grimesvariables that are frequently exported by
166afe61c15SRodney W. Grimes.Pa .profile
167afe61c15SRodney W. Grimesfiles, such as
168afe61c15SRodney W. Grimes.Ev MAIL ,
169afe61c15SRodney W. Grimes.Ev PS1 ,
170afe61c15SRodney W. Grimes.Ev PS2 ,
171afe61c15SRodney W. Grimesand
172afe61c15SRodney W. Grimes.Ev IFS ,
173afe61c15SRodney W. Grimesunless you know what you are doing.
174afe61c15SRodney W. Grimes.Sh SEE ALSO
175afe61c15SRodney W. Grimes.Xr csh 1 ,
176afe61c15SRodney W. Grimes.Xr ex 1 ,
177afe61c15SRodney W. Grimes.Xr login 1 ,
178afe61c15SRodney W. Grimes.Xr sh 1 ,
179afe61c15SRodney W. Grimes.Xr execve 2 ,
180afe61c15SRodney W. Grimes.Xr execle 3 ,
1817c2aa513SAndrey A. Chernov.Xr setlocale 3 ,
182afe61c15SRodney W. Grimes.Xr system 3 ,
183afe61c15SRodney W. Grimes.Xr termcap 3 ,
184afe61c15SRodney W. Grimes.Xr termcap 5
185afe61c15SRodney W. Grimes.Sh HISTORY
186afe61c15SRodney W. GrimesThe
187afe61c15SRodney W. Grimes.Nm environ
188afe61c15SRodney W. Grimesmanual page appeared in
189afe61c15SRodney W. Grimes.Bx 4.2 .
190