|
|
1.1 root 1: .\" Copyright (c) 1983, 1990 The Regents of the University of California.
2: .\" All rights reserved.
3: .\"
4: .\" Redistribution and use in source and binary forms are permitted provided
5: .\" that: (1) source distributions retain this entire copyright notice and
6: .\" comment, and (2) distributions including binaries display the following
7: .\" acknowledgement: ``This product includes software developed by the
8: .\" University of California, Berkeley and its contributors'' in the
9: .\" documentation or other materials provided with the distribution and in
10: .\" all advertising materials mentioning features or use of this software.
11: .\" Neither the name of the University nor the names of its contributors may
12: .\" be used to endorse or promote products derived from this software without
13: .\" specific prior written permission.
14: .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
15: .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
16: .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17: .\"
18: .\" @(#)environ.7 6.5 (Berkeley) 6/24/90
19: .\"
20: .Dd June 24, 1990
21: .Dt ENVIRON 7
22: .Os BSD 4.2
23: .Sh NAME
24: .Nm environ
25: .Nd user environment
26: .Sh SYNOPSIS
27: .Ar extern char **environ ;
28: .Sh DESCRIPTION
29: An array of strings called the
30: .Ar environment
31: is made available by
32: .Xr execve 2
33: when a process begins. By convention these strings have the form
34: .Dq Ar name=value .
35: The following names are used by various commands:
36: .Tw Fl
37: .Tp Ev EXINIT
38: A startup list of commands read by
39: .Xr ex 1 ,
40: .Xr edit 1 ,
41: and
42: .Xr vi 1 .
43: .Tp Ev HOME
44: A user's login directory, set by
45: .Xr login 1
46: from the password file
47: .Xr passwd 5 .
48: .Tp Ev PATH
49: The sequence of directories, separated by colons, searched by
50: .Xr csh 1 ,
51: .Xr sh 1 ,
52: .Xr system 3 ,
53: .Xr execvp 3 ,
54: etc, when looking for an executable file.
55: PATH is set to ``:/usr/ucb:/bin:/usr/bin'' initially by
56: .Xr login 1 .
57: .Tp Ev PRINTER
58: The name of the default printer to be used by
59: .Xr lpr 1 ,
60: .Xr lpq 1 ,
61: and
62: .Xr lprm 1 .
63: .Tp Ev SHELL
64: The full pathname of the user's login shell.
65: .Tp Ev TERM
66: The kind of terminal for which output is to be prepared.
67: This information is used by commands, such as
68: .Xr nroff 1
69: or
70: .Xr plot 1
71: which may exploit special terminal capabilities. See
72: .Pa /usr/share/misc/termcap
73: .Pq Xr tmercap 5
74: for a list of terminal types.
75: .Tp Ev TERMCAP
76: The string describing the terminal in TERM, or, if
77: it begins with a '/', the name of the termcap file.
78: See
79: .Ev TERMPATH
80: below,
81: .Xr termcap 5 ,
82: and
83: .Xr termcap .
84: .Tp Ev TERMPATH
85: A sequence of pathnames of termcap files, separated by colons or spaces,
86: which are searched for terminal descriptions in the order listed. Having
87: no
88: .Ev TERMPATH
89: is equivalent to a
90: .Ev TERMPATH
91: of
92: .Dq Pa $HOME/.termcap:/etc/termcap .
93: .Ev TERMPATH
94: is ignored if
95: .Ev TERMCAP
96: contains a full pathname.
97: .Tp Ev USER
98: The login name of the user.
99: .Tp
100: .Pp
101: Further names may be placed in the environment by the
102: .Xr export
103: command and
104: .Ar name=value
105: arguments in
106: .Xr sh 1 ,
107: or by the
108: .Xr setenv
109: command if you use
110: .Xr csh 1 .
111: It is unwise to change certain
112: .Xr sh 1
113: variables that are frequently exported by
114: .Pa .profile
115: files, such as
116: .Ev MAIL ,
117: .Ev PS1 ,
118: .Ev PS2 ,
119: and
120: .Ev IFS ,
121: unless you know what you are doing.
122: .Sh SEE ALSO
123: .Xr csh 1 ,
124: .Xr ex 1 ,
125: .Xr login 1 ,
126: .Xr sh 1 ,
127: .Xr execve 2 ,
128: .Xr execle 3 ,
129: .Xr system 3 ,
130: .Xr termcap 3 ,
131: .Xr termcap 5
132: .Sh HISTORY
133: .Nm Environ
134: appeared in 4.2 BSD.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.