Files
oldlinux-files/Minix/2.0.0/wwwman/man7/environ.7.html
2024-02-19 00:21:39 -05:00

120 lines
4.5 KiB
HTML

<HTML>
<HEAD>
<TITLE>environ(7)</TITLE>
</HEAD>
<BODY>
<H1>environ(7)</H1>
<HR>
<PRE>
</PRE>
<H2>NAME</H2><PRE>
environ - user environment
</PRE>
<H2>SYNOPSIS</H2><PRE>
<STRONG>extern</STRONG> <STRONG>char</STRONG> <STRONG>*const</STRONG> <STRONG>*environ;</STRONG>
</PRE>
<H2>DESCRIPTION</H2><PRE>
An array of strings called the `environment' is made available by
<STRONG><A HREF="../man2/execve.2.html">execve(2)</A></STRONG> when a process begins. By convention these strings have the
form `<EM>name</EM>=<EM>value</EM>'. The following names are used by various commands:
<STRONG>PATH</STRONG> The sequence of directory prefixes that <STRONG>sh</STRONG>, <STRONG>time</STRONG>, <STRONG><A HREF="../man1/nice.1.html">nice(1)</A></STRONG>, etc.,
apply in searching for a file known by an incomplete path name.
The prefixes are separated by `:'. Login shells set
<STRONG>PATH=:/bin:/usr/bin</STRONG>. Note that the empty space between the `='
and the `:' indicates the current directory. Security aware
people move the extra `:' to the end of their path or omit it.
<STRONG>HOME</STRONG> A user's login directory, set by <STRONG><A HREF="../man1/login.1.html">login(1)</A></STRONG> from the password file
<STRONG><A HREF="../man5/passwd.5.html">passwd(5)</A></STRONG>.
<STRONG>TERM</STRONG> The kind of terminal for which output is to be prepared. This
information is used by programs that wish to exploit special
terminal capabilities, a screen oriented text editor for
instance. The terminal type is set by <STRONG><A HREF="../man1/login.1.html">login(1)</A></STRONG> from the tty
database <STRONG><A HREF="../man5/ttytab.5.html">ttytab(5)</A></STRONG>.
<STRONG>SHELL</STRONG> The file name of the users login shell, set by <STRONG><A HREF="../man1/login.1.html">login(1)</A></STRONG> from the
password file <STRONG><A HREF="../man5/passwd.5.html">passwd(5)</A></STRONG>.
<STRONG>TERMCAP</STRONG> The string describing the terminal in TERM, or the name of the
termcap file, see <STRONG><A HREF="../man5/termcap.5.html">termcap(5)</A></STRONG>, <STRONG><A HREF="../man3/termcap.3.html">termcap(3)</A></STRONG>.
<STRONG>EXINIT</STRONG> A startup list of commands read by <STRONG><A HREF="../man1/elvis.1.html">elvis(1)</A></STRONG>.
<STRONG>USER</STRONG> The login name of the user, set by <STRONG><A HREF="../man1/login.1.html">login(1)</A></STRONG> from the password
file <STRONG><A HREF="../man5/passwd.5.html">passwd(5)</A></STRONG>.
<STRONG>LOGNAME</STRONG> Set to the same value as <STRONG>USER</STRONG>. BSD derived systems have <STRONG>USER</STRONG>,
System V has <STRONG>LOGNAME</STRONG>, so modern systems have both to avoid
problems.
Further names may be placed in the environment by the <STRONG>export</STRONG> command and
`<EM>name</EM>=<EM>value</EM>' arguments in <STRONG><A HREF="../man1/sh.1.html">sh(1)</A></STRONG>. Arguments may also be placed in their
environment by programs if they use <STRONG><A HREF="../man3/putenv.3.html">putenv(3)</A></STRONG>. Or in the environment of
another program by building a new environment for one of the exec
functions that accepts an environment list, like <STRONG><A HREF="../man2/execle.2.html">execle(2)</A></STRONG> or <STRONG><A HREF="../man2/execve.2.html">execve(2)</A></STRONG>.
It is unwise to conflict with certain <STRONG><A HREF="../man1/sh.1.html">sh(1)</A></STRONG> variables that are frequently
set and/or exported by `.profile' files: <STRONG>MAIL</STRONG>, <STRONG>PS1</STRONG>, <STRONG>PS2</STRONG>, <STRONG>IFS</STRONG>.
</PRE>
<H2>SEE ALSO</H2><PRE>
<STRONG><A HREF="../man1/elvis.1.html">elvis(1)</A></STRONG>, <STRONG><A HREF="../man1/login.1.html">login(1)</A></STRONG>, <STRONG><A HREF="../man1/sh.1.html">sh(1)</A></STRONG>, <STRONG><A HREF="../man2/execl.2.html">execl(2)</A></STRONG>, <STRONG><A HREF="../man2/execve.2.html">execve(2)</A></STRONG>, <STRONG><A HREF="../man3/system.3.html">system(3)</A></STRONG>, <STRONG><A HREF="../man3/termcap.3.html">termcap(3)</A></STRONG>,
<STRONG><A HREF="../man5/termcap.5.html">termcap(5)</A></STRONG>, <STRONG><A HREF="../man5/ttytab.5.html">ttytab(5)</A></STRONG>.
</PRE>
</BODY>
</HTML>