xref: /csrg-svn/share/man/man7/environ.7 (revision 43687)
1*43687Scael.\" Copyright (c) 1983, 1990 The Regents of the University of California.
2*43687Scael.\" All rights reserved.
320969Smckusick.\"
4*43687Scael.\" %sccs.include.redist.man%
520969Smckusick.\"
6*43687Scael.\"     @(#)environ.7	6.5 (Berkeley) 06/24/90
7*43687Scael.\"
8*43687Scael.Dd
9*43687Scael.Dt ENVIRON 7
10*43687Scael.Os BSD 4.2
11*43687Scael.Sh NAME
12*43687Scael.Nm environ
13*43687Scael.Nd user environment
14*43687Scael.Sh SYNOPSIS
15*43687Scael.Ar extern char **environ ;
16*43687Scael.Sh DESCRIPTION
1732394SjakAn array of strings called the
18*43687Scael.Ar environment
1932394Sjakis made available by
20*43687Scael.Xr execve  2
2120969Smckusickwhen a process begins.  By convention these strings have the form
22*43687Scael.Dq Ar name=value .
23*43687ScaelThe following names are used by various commands:
24*43687Scael.Tw Fl
25*43687Scael.Tp Ev EXINIT
2632394SjakA startup list of commands read by
27*43687Scael.Xr ex  1  ,
28*43687Scael.Xr edit  1 ,
2932394Sjakand
30*43687Scael.Xr vi  1  .
31*43687Scael.Tp Ev HOME
3220969SmckusickA user's login directory, set by
33*43687Scael.Xr login  1
3420969Smckusickfrom the password file
35*43687Scael.Xr passwd  5  .
36*43687Scael.Tp Ev PATH
3732394SjakThe sequence of directories, separated by colons, searched by
38*43687Scael.Xr csh  1  ,
39*43687Scael.Xr sh  1 ,
40*43687Scael.Xr system  3  ,
41*43687Scael.Xr execvp  3 ,
4232395Sbosticetc, when looking for an executable file.
4332395SbosticPATH is set to ``:/usr/ucb:/bin:/usr/bin'' initially by
44*43687Scael.Xr login  1  .
45*43687Scael.Tp Ev PRINTER
4632394SjakThe name of the default printer to be used by
47*43687Scael.Xr lpr  1  ,
48*43687Scael.Xr lpq  1 ,
4932394Sjakand
50*43687Scael.Xr lprm  1  .
51*43687Scael.Tp Ev SHELL
5232394SjakThe full pathname of the user's login shell.
53*43687Scael.Tp Ev TERM
5420969SmckusickThe kind of terminal for which output is to be prepared.
5520969SmckusickThis information is used by commands, such as
56*43687Scael.Xr nroff  1
5720969Smckusickor
58*43687Scael.Xr plot 1
5920969Smckusickwhich may exploit special terminal capabilities.  See
60*43687Scael.Pa /usr/share/misc/termcap
61*43687Scael.Pq Xr tmercap 5
6220969Smckusickfor a list of terminal types.
63*43687Scael.Tp Ev TERMCAP
6432394SjakThe string describing the terminal in TERM, or, if
6532394Sjakit begins with a '/', the name of the termcap file.
66*43687ScaelSee
67*43687Scael.Ev TERMPATH
68*43687Scaelbelow,
69*43687Scael.Xr termcap  5  ,
7020969Smckusickand
71*43687Scael.Xr termcap  .
72*43687Scael.Tp Ev TERMPATH
7332394SjakA sequence of pathnames of termcap files, separated by colons or spaces,
7432395Sbosticwhich are searched for terminal descriptions in the order listed.  Having
75*43687Scaelno
76*43687Scael.Ev TERMPATH
77*43687Scaelis equivalent to a
78*43687Scael.Ev TERMPATH
79*43687Scaelof
80*43687Scael.Dq Pa $HOME/.termcap:/etc/termcap .
81*43687Scael.Ev TERMPATH
82*43687Scaelis ignored if
83*43687Scael.Ev TERMCAP
84*43687Scaelcontains a full pathname.
85*43687Scael.Tp Ev USER
8620969SmckusickThe login name of the user.
87*43687Scael.Tp
88*43687Scael.Pp
8920969SmckusickFurther names may be placed in the environment by the
90*43687Scael.Xr export
9132394Sjakcommand and
92*43687Scael.Ar name=value
9332394Sjakarguments in
94*43687Scael.Xr sh  1  ,
9520969Smckusickor by the
96*43687Scael.Xr setenv
9720969Smckusickcommand if you use
98*43687Scael.Xr csh  1  .
99*43687ScaelIt is unwise to change certain
100*43687Scael.Xr sh  1
10132394Sjakvariables that are frequently exported by
102*43687Scael.Pa .profile
103*43687Scaelfiles, such as
104*43687Scael.Ev MAIL ,
105*43687Scael.Ev PS1 ,
106*43687Scael.Ev PS2 ,
107*43687Scaeland
108*43687Scael.Ev IFS ,
10932394Sjakunless you know what you are doing.
110*43687Scael.Sh SEE ALSO
111*43687Scael.Xr csh 1 ,
112*43687Scael.Xr ex 1 ,
113*43687Scael.Xr login 1 ,
114*43687Scael.Xr sh 1 ,
115*43687Scael.Xr execve 2 ,
116*43687Scael.Xr execle 3 ,
117*43687Scael.Xr system 3 ,
118*43687Scael.Xr termcap 3 ,
119*43687Scael.Xr termcap 5
120*43687Scael.Sh HISTORY
121*43687Scael.Nm Environ
122*43687Scaelappeared in 4.2 BSD.
123