date and time created 88/12/12 20:54:43 by kfall
[unix-history] / usr / src / old / man / environ.5
CommitLineData
8a35f543
KM
1.\" Copyright (c) 1980 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
5.\" @(#)environ.5 4.1 (Berkeley) %G%
6.\"
7.TH ENVIRON 5
8.UC 4
9.SH NAME
10environ \- user environment
11.SH SYNOPSIS
12.B extern char **environ;
13.SH DESCRIPTION
14An array of strings called the `environment' is
15made available by
16.IR exec (2)
17when a process begins.
18By convention these strings have the form
19.RI ` name = value '.
20The following names are used by various commands:
21.TP "\w'TERMCAP 'u"
22PATH
23The sequence of directory prefixes that
24.I sh, time,
25.IR nice (1),
26etc.,
27apply in searching for a file known by an incomplete path name.
28The prefixes are separated by `:'.
29.IR Login (1)
30sets PATH=:/usr/ucb:/bin:/usr/bin.
31.TP
32HOME
33A user's login directory, set by
34.IR login (1)
35from the password file
36.IR passwd (5).
37.TP
38TERM
39The kind of terminal for which output is to be prepared.
40This information is used by commands, such as
41.I nroff
42or
43.IR plot (1),
44which may exploit special terminal capabilities.
45See
46.I /etc/termcap
47.RI ( termcap (5))
48for a list of terminal types.
49.TP
50SHELL
51The file name of the users login shell.
52.TP
53TERMCAP
54The string describing the terminal in TERM,
55or the name of the termcap file, see
56.IR termcap (5), termlib (3).
57.TP
58EXINIT
59A startup list of commands read by
60.IR ex (1),
61.IR edit (1),
62and
63.IR vi (1).
64.TP
65USER
66The login name of the user.
67.PP
68Further names may be placed in the environment by
69the
70.I export
71command and `name=value' arguments in
72.IR sh (1),
73or by the
74.I setenv
75command if you use
76.IR csh (1).
77Arguments may also be placed in the environment at the point of an
78.IR exec (2).
79It is unwise to conflict with
80certain
81.IR sh (1)
82variables that are frequently exported by
83`.profile' files:
84MAIL, PS1, PS2, IFS.
85.SH SEE ALSO
86csh(1), ex(1), login(1), sh(1), exec(2), system(3), termlib(3), termcap(5), term(7)