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