xref: /csrg-svn/share/man/man7/environ.7 (revision 50441)
143687Scael.\" Copyright (c) 1983, 1990 The Regents of the University of California.
243687Scael.\" All rights reserved.
320969Smckusick.\"
4*50441Scael.\" %sccs.include.redist.roff%
520969Smckusick.\"
6*50441Scael.\"	@(#)environ.7	6.6 (Berkeley) 07/19/91
743687Scael.\"
843687Scael.Dd
943687Scael.Dt ENVIRON 7
1043687Scael.Os BSD 4.2
1143687Scael.Sh NAME
1243687Scael.Nm environ
1343687Scael.Nd user environment
1443687Scael.Sh SYNOPSIS
1543687Scael.Ar extern char **environ ;
1643687Scael.Sh DESCRIPTION
1732394SjakAn array of strings called the
1843687Scael.Ar environment
1932394Sjakis made available by
2043687Scael.Xr execve  2
2120969Smckusickwhen a process begins.  By convention these strings have the form
2243687Scael.Dq Ar name=value .
2343687ScaelThe following names are used by various commands:
24*50441Scael.Bl -tag -width Fl
25*50441Scael.It Ev EXINIT
2632394SjakA startup list of commands read by
2743687Scael.Xr ex  1  ,
2843687Scael.Xr edit  1 ,
2932394Sjakand
3043687Scael.Xr vi  1  .
31*50441Scael.It Ev HOME
3220969SmckusickA user's login directory, set by
3343687Scael.Xr login  1
3420969Smckusickfrom the password file
3543687Scael.Xr passwd  5  .
36*50441Scael.It Ev PATH
3732394SjakThe sequence of directories, separated by colons, searched by
3843687Scael.Xr csh  1  ,
3943687Scael.Xr sh  1 ,
4043687Scael.Xr system  3  ,
4143687Scael.Xr execvp  3 ,
4232395Sbosticetc, when looking for an executable file.
4332395SbosticPATH is set to ``:/usr/ucb:/bin:/usr/bin'' initially by
4443687Scael.Xr login  1  .
45*50441Scael.It Ev PRINTER
4632394SjakThe name of the default printer to be used by
4743687Scael.Xr lpr  1  ,
4843687Scael.Xr lpq  1 ,
4932394Sjakand
5043687Scael.Xr lprm  1  .
51*50441Scael.It Ev SHELL
5232394SjakThe full pathname of the user's login shell.
53*50441Scael.It Ev TERM
5420969SmckusickThe kind of terminal for which output is to be prepared.
5520969SmckusickThis information is used by commands, such as
5643687Scael.Xr nroff  1
5720969Smckusickor
5843687Scael.Xr plot 1
5920969Smckusickwhich may exploit special terminal capabilities.  See
6043687Scael.Pa /usr/share/misc/termcap
6143687Scael.Pq Xr tmercap 5
6220969Smckusickfor a list of terminal types.
63*50441Scael.It Ev TERMCAP
6432394SjakThe string describing the terminal in TERM, or, if
6532394Sjakit begins with a '/', the name of the termcap file.
6643687ScaelSee
6743687Scael.Ev TERMPATH
6843687Scaelbelow,
6943687Scael.Xr termcap  5  ,
7020969Smckusickand
7143687Scael.Xr termcap  .
72*50441Scael.It 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
7543687Scaelno
7643687Scael.Ev TERMPATH
7743687Scaelis equivalent to a
7843687Scael.Ev TERMPATH
7943687Scaelof
8043687Scael.Dq Pa $HOME/.termcap:/etc/termcap .
8143687Scael.Ev TERMPATH
8243687Scaelis ignored if
8343687Scael.Ev TERMCAP
8443687Scaelcontains a full pathname.
85*50441Scael.It Ev USER
8620969SmckusickThe login name of the user.
87*50441Scael.El
8843687Scael.Pp
8920969SmckusickFurther names may be placed in the environment by the
9043687Scael.Xr export
9132394Sjakcommand and
9243687Scael.Ar name=value
9332394Sjakarguments in
9443687Scael.Xr sh  1  ,
9520969Smckusickor by the
9643687Scael.Xr setenv
9720969Smckusickcommand if you use
9843687Scael.Xr csh  1  .
9943687ScaelIt is unwise to change certain
10043687Scael.Xr sh  1
10132394Sjakvariables that are frequently exported by
10243687Scael.Pa .profile
10343687Scaelfiles, such as
10443687Scael.Ev MAIL ,
10543687Scael.Ev PS1 ,
10643687Scael.Ev PS2 ,
10743687Scaeland
10843687Scael.Ev IFS ,
10932394Sjakunless you know what you are doing.
11043687Scael.Sh SEE ALSO
11143687Scael.Xr csh 1 ,
11243687Scael.Xr ex 1 ,
11343687Scael.Xr login 1 ,
11443687Scael.Xr sh 1 ,
11543687Scael.Xr execve 2 ,
11643687Scael.Xr execle 3 ,
11743687Scael.Xr system 3 ,
11843687Scael.Xr termcap 3 ,
11943687Scael.Xr termcap 5
12043687Scael.Sh HISTORY
121*50441ScaelThe
122*50441Scael.Nm environ
123*50441Scaelmanual page appeared in
124*50441Scael.Bx 4.2 .
125