.\" Copyright (c) 1993 Michael Haardt (u31b3hs@pool.informatik.rwth-aachen.de), .\" Fri Apr 2 11:32:09 MET DST 1993 .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as .\" published by the Free Software Foundation; either version 2 of .\" the License, or (at your option) any later version. .\" .\" The GNU General Public License's references to "object code" .\" and "executables" are to be interpreted as the output of any .\" document formatting or typesetting system, including .\" intermediate and printed output. .\" .\" This manual is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, .\" USA. .\" .\" Modified Sun Jul 25 10:45:30 1993 by Rik Faith (faith@cs.unc.edu) .\" Modified Sun Jul 21 21:25:26 1996 by Andries Brouwer (aeb@cwi.nl) .\" Modified Mon Oct 21 17:47:19 1996 by Eric S. Raymond (esr@thyrsus.com) .\" .TH ENVIRON 5 "October 21, 1996" "Linux" "Linux Programmer's Manual" .SH NAME environ \- user environment .SH SYNOPSIS .ad l .nf .B extern char **environ; .fi .ad b .SH DESCRIPTION An array of strings called the `environment' is made available by \fBexec\fP(2) when a process begins. By convention these strings have the form `\fIname\fP\fB=\fP\fIvalue\fP'. Common examples are: .TP .B USER The name of the logged-in user (used by some BSD-derived programs). .TP .B LOGNAME The name of the logged-in user (used by some System-V derived programs). .TP .B HOME A user's login directory, set by \fBlogin\fP(1) from the password file \fBpasswd\fP(5). .TP .B LANG The name of a locale to use for locale categories when not overridden by \fBLC_ALL\fP or more specific environment variables. .TP .B PATH The sequence of directory prefixes that \fBsh\fP(1) and many other programs apply in searching for a file known by an incomplete path name. The prefixes are separated by `\fB:\fP'. .TP .B SHELL The file name of the user's login shell. .TP .B TERM The terminal type for which output is to be prepared. .PP Further names may be placed in the environment by the \fBexport\fP command and `name=value' in \fBsh\fP(1), or by the \fBsetenv\fP command if you use \fBcsh\fP(1). Arguments may also be placed in the environment at the point of an \fBexec\fP(2). It is risky practice to set name=value pairs that conflict with well-known shell variables. Setting these could cause surprising behaviour in subshells or .BR system (3) commands. .SH "SEE ALSO" .BR login (1), .BR sh (1), .BR bash (1), .BR csh (1), .BR tcsh (1), .BR exec (2), .BR system (3).