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