161609Sbostic.\" Copyright (c) 1983, 1990, 1993 261609Sbostic.\" The Regents of the University of California. All rights reserved. 320969Smckusick.\" 450441Scael.\" %sccs.include.redist.roff% 520969Smckusick.\" 6*66981Sbostic.\" @(#)environ.7 8.3 (Berkeley) 04/19/94 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: 2452777Sbostic.Bl -tag -width BLOCKSIZE 2552777Sbostic.It Ev BLOCKSIZE 2652777SbosticThe size of the block units used by several commands, most notably 2752777Sbostic.Xr df 1 , 2852777Sbostic.Xr du 1 2952777Sbosticand 3052777Sbostic.Xr ls 1 . 3152777SbosticBLOCKSIZE may be specified in units of a byte by specifying a number, 3252777Sbosticin units of a kilobyte by specifying a number followed by ``K'' or 3352777Sbostic``k'', in units of a megabyte by specifying a number followed by ``M'' 3452777Sbosticor ``m'' and in units of a gigabyte by specifying a number followed 3552777Sbosticby ``G'' or ``g''. 3652777SbosticSizes less than 512 bytes or greater than a gigabyte are ignored. 3750441Scael.It Ev EXINIT 3832394SjakA startup list of commands read by 3943687Scael.Xr ex 1 , 4043687Scael.Xr edit 1 , 4132394Sjakand 4243687Scael.Xr vi 1 . 4350441Scael.It Ev HOME 4420969SmckusickA user's login directory, set by 4543687Scael.Xr login 1 4620969Smckusickfrom the password file 4743687Scael.Xr passwd 5 . 4850441Scael.It Ev PATH 4932394SjakThe sequence of directories, separated by colons, searched by 5043687Scael.Xr csh 1 , 5143687Scael.Xr sh 1 , 5243687Scael.Xr system 3 , 5343687Scael.Xr execvp 3 , 5432395Sbosticetc, when looking for an executable file. 5532395SbosticPATH is set to ``:/usr/ucb:/bin:/usr/bin'' initially by 5643687Scael.Xr login 1 . 5750441Scael.It Ev PRINTER 5832394SjakThe name of the default printer to be used by 5943687Scael.Xr lpr 1 , 6043687Scael.Xr lpq 1 , 6132394Sjakand 6243687Scael.Xr lprm 1 . 6350441Scael.It Ev SHELL 6432394SjakThe full pathname of the user's login shell. 6550441Scael.It Ev TERM 6620969SmckusickThe kind of terminal for which output is to be prepared. 6720969SmckusickThis information is used by commands, such as 6843687Scael.Xr nroff 1 6920969Smckusickor 7043687Scael.Xr plot 1 7120969Smckusickwhich may exploit special terminal capabilities. See 7243687Scael.Pa /usr/share/misc/termcap 73*66981Sbostic.Pq Xr termcap 5 7420969Smckusickfor a list of terminal types. 7550441Scael.It Ev TERMCAP 7632394SjakThe string describing the terminal in TERM, or, if 7732394Sjakit begins with a '/', the name of the termcap file. 7843687ScaelSee 7943687Scael.Ev TERMPATH 8043687Scaelbelow, 8143687Scael.Xr termcap 5 , 8220969Smckusickand 8343687Scael.Xr termcap . 8450441Scael.It Ev TERMPATH 8532394SjakA sequence of pathnames of termcap files, separated by colons or spaces, 8632395Sbosticwhich are searched for terminal descriptions in the order listed. Having 8743687Scaelno 8843687Scael.Ev TERMPATH 8943687Scaelis equivalent to a 9043687Scael.Ev TERMPATH 9143687Scaelof 9243687Scael.Dq Pa $HOME/.termcap:/etc/termcap . 9343687Scael.Ev TERMPATH 9443687Scaelis ignored if 9543687Scael.Ev TERMCAP 9643687Scaelcontains a full pathname. 9756676Sbostic.It Ev TMPDIR 9856676SbosticThe directory in which to store temporary files. 9956676SbosticMost applications use either 10056676Sbostic.Dq /tmp 10156676Sbosticor 10256676Sbostic.Dq /var/tmp . 10356676SbosticSetting this variable will make them use another directory. 10464910Sbostic.It Ev TZ 10564910SbosticThe timezone to use when displaying dates. 10664910SbosticThe normal format is a pathname relative to 10764910Sbostic.Dq /usr/share/zoneinfo . 10864910SbosticFor example, the command 10964910Sbostic.Dq env TZ=US/Pacific date 11064910Sbosticdisplays the current time in California. 11164910SbosticSee 11264910Sbostic.Xr tzset 3 11364910Sbosticfor more information. 11450441Scael.It Ev USER 11520969SmckusickThe login name of the user. 11650441Scael.El 11743687Scael.Pp 11820969SmckusickFurther names may be placed in the environment by the 11943687Scael.Xr export 12032394Sjakcommand and 12143687Scael.Ar name=value 12232394Sjakarguments in 12343687Scael.Xr sh 1 , 12420969Smckusickor by the 12543687Scael.Xr setenv 12620969Smckusickcommand if you use 12743687Scael.Xr csh 1 . 12843687ScaelIt is unwise to change certain 12943687Scael.Xr sh 1 13032394Sjakvariables that are frequently exported by 13143687Scael.Pa .profile 13243687Scaelfiles, such as 13343687Scael.Ev MAIL , 13443687Scael.Ev PS1 , 13543687Scael.Ev PS2 , 13643687Scaeland 13743687Scael.Ev IFS , 13832394Sjakunless you know what you are doing. 13943687Scael.Sh SEE ALSO 14043687Scael.Xr csh 1 , 14143687Scael.Xr ex 1 , 14243687Scael.Xr login 1 , 14343687Scael.Xr sh 1 , 14443687Scael.Xr execve 2 , 14543687Scael.Xr execle 3 , 14643687Scael.Xr system 3 , 14743687Scael.Xr termcap 3 , 14843687Scael.Xr termcap 5 14943687Scael.Sh HISTORY 15050441ScaelThe 15150441Scael.Nm environ 15250441Scaelmanual page appeared in 15350441Scael.Bx 4.2 . 154