Commit | Line | Data |
---|---|---|
7e93bfe3 KB |
1 | .\" Copyright (c) 1985, 1991, 1993 |
2 | .\" The Regents of the University of California. All rights reserved. | |
452cf41c | 3 | .\" |
1398e9b8 | 4 | .\" %sccs.include.redist.roff% |
452cf41c | 5 | .\" |
7e93bfe3 | 6 | .\" @(#)ttys.5 8.1 (Berkeley) %G% |
6d85239e | 7 | .\" |
1398e9b8 CL |
8 | .Dd |
9 | .Dt TTYS 5 | |
10 | .Os | |
11 | .Sh NAME | |
12 | .Nm ttys | |
13 | .Nd terminal initialization information | |
14 | .Sh DESCRIPTION | |
15 | The file | |
16 | .Nm ttys | |
17 | contains information that is used by various routines to initialize | |
452cf41c KB |
18 | and control the use of terminal special files. |
19 | This information is read with the | |
1398e9b8 | 20 | .Xr getttyent 3 |
3892b435 | 21 | library routines. |
5dc2d425 | 22 | There is one line in the |
1398e9b8 CL |
23 | .Nm ttys |
24 | file per special device file. | |
3892b435 | 25 | Fields are separated by tabs and/or spaces. |
452cf41c KB |
26 | Fields comprised of more than one word should be enclosed in double |
27 | quotes (``"''). | |
28 | Blank lines and comments may appear anywhere in the file; comments | |
29 | are delimited by hash marks (``#'') and new lines. | |
30 | Any unspecified fields will default to null. | |
1398e9b8 CL |
31 | .Pp |
32 | The first field is the | |
33 | name of the terminal special file as it is found in | |
34 | .Pa /dev . | |
35 | .Pp | |
3892b435 | 36 | The second field of the file is the command to execute for the line, |
1398e9b8 CL |
37 | usually |
38 | .Xr getty 8 , | |
39 | which initializes and opens the line, setting the speed, waiting for | |
40 | a user name and executing the | |
41 | .Xr login 1 | |
42 | program. | |
9a843f03 | 43 | It can be, however, any desired command, for example |
597e0114 | 44 | the start up for a window system terminal emulator or some other |
026d867c | 45 | daemon process, and can contain multiple words if quoted. |
1398e9b8 | 46 | .Pp |
452cf41c KB |
47 | The third field is the type of terminal usually connected to that |
48 | tty line, normally the one found in the | |
1398e9b8 | 49 | .Xr termcap 5 |
3892b435 | 50 | data base file. |
1398e9b8 CL |
51 | The environment variable |
52 | .Dv TERM | |
53 | is initialized with the value by | |
452cf41c | 54 | either |
1398e9b8 | 55 | .Xr getty 8 |
452cf41c | 56 | or |
1398e9b8 CL |
57 | .Xr login 1 . |
58 | .Pp | |
597e0114 | 59 | The remaining fields set flags in the |
1398e9b8 | 60 | .Fa ty_status |
3892b435 | 61 | entry (see |
1398e9b8 | 62 | .Xr getttyent 3 ) |
597e0114 | 63 | or specify a window system process that |
1398e9b8 | 64 | .Xr init 8 |
3892b435 | 65 | will maintain for the terminal line. |
1398e9b8 | 66 | .Pp |
452cf41c | 67 | As flag values, the strings ``on'' and ``off'' specify that |
1398e9b8 | 68 | .Xr init |
452cf41c KB |
69 | should (should not) execute the command given in the second field, |
70 | while ``secure'' (if ``on'' is also specified) allows users with a | |
71 | uid of 0 to login on | |
72 | this line. | |
73 | These flag fields should not be quoted. | |
1398e9b8 | 74 | .Pp |
452cf41c | 75 | The string ``window='' may be followed by a quoted command |
597e0114 | 76 | string which |
1398e9b8 | 77 | .Xr init |
452cf41c | 78 | will execute |
1398e9b8 | 79 | .Em before |
452cf41c | 80 | starting the command specified by the second field. |
1398e9b8 CL |
81 | .Sh EXAMPLES |
82 | .Bd -literal | |
452cf41c | 83 | # root login on console at 1200 baud |
b10a9b31 | 84 | console "/usr/libexec/getty std.1200" vt100 on secure |
452cf41c | 85 | # dialup at 1200 baud, no root logins |
b10a9b31 | 86 | ttyd0 "/usr/libexec/getty d1200" dialup on # 555-1234 |
452cf41c | 87 | # Mike's terminal: hp2621 |
b10a9b31 | 88 | ttyh0 "/usr/libexec/getty std.9600" hp2621-nl on # 457 Evans |
452cf41c | 89 | # John's terminal: vt100 |
b10a9b31 | 90 | ttyh1 "/usr/libexec/getty std.9600" vt100 on # 459 Evans |
452cf41c | 91 | # terminal emulate/window system |
b10a9b31 | 92 | ttyv0 "/usr/new/xterm -L :0" vs100 on window="/usr/new/Xvs100 0" |
452cf41c | 93 | # Network pseudo ttys -- don't enable getty |
9a843f03 MK |
94 | ttyp0 none network |
95 | ttyp1 none network off | |
1398e9b8 CL |
96 | .Ed |
97 | .Sh FILES | |
98 | .Bl -tag -width /etc/ttys -compact | |
99 | .It Pa /etc/ttys | |
100 | .El | |
101 | .Sh SEE ALSO | |
102 | .Xr login 1 , | |
103 | .Xr getttyent 3 , | |
104 | .Xr ttyslot 3 , | |
105 | .Xr gettytab 5 , | |
106 | .Xr termcap 5 , | |
107 | .Xr getty 8 , | |
108 | .Xr init 8 | |
109 | .Sh HISTORY | |
110 | A | |
111 | .Nm | |
112 | file appeared in | |
113 | .At v6 . |