add man page, cleanup
[unix-history] / usr / src / libexec / getty / ttys.5
CommitLineData
9a843f03 1.\" @(#)ttys.5 6.4 (Berkeley) %G%
6d85239e 2.\"
3892b435 3.TH TTYS 5 ""
6d85239e
KM
4.AT 3
5.SH NAME
6ttys \- terminal initialization data
7.SH DESCRIPTION
8The
9.I ttys
3892b435
KM
10file contains information that is used by various routines to initialize
11and control the use of terminal special files. This information is read
12with the
13.IR getttyent (3)
14library routines.
5dc2d425
KM
15There is one line in the
16.I ttys
17file per special file.
3892b435 18Fields are separated by tabs and/or spaces.
026d867c
JL
19Some fields may contain more than one word and should be enclosed
20in double quotes.
3892b435 21Blank lines and comments can appear anywhere in the file; comments
9a843f03 22are delimited by `#' and new line. Unspecified fields default to null.
3892b435
KM
23The first field is the terminal's entry in the device directory, /dev.
24The second field of the file is the command to execute for the line,
25typically
6d85239e 26.IR getty (8),
5dc2d425 27which performs such tasks as baud-rate recognition, reading the login name,
6d85239e 28and calling
3892b435 29.IR login (1).
9a843f03 30It can be, however, any desired command, for example
597e0114 31the start up for a window system terminal emulator or some other
026d867c 32daemon process, and can contain multiple words if quoted.
597e0114
JL
33The third field is the type of terminal normally connected to that
34tty line, as found in the
3892b435
KM
35.IR termcap (5)
36data base file.
597e0114 37The remaining fields set flags in the
3892b435
KM
38.I ty_status
39entry (see
40.IR getttyent (3))
597e0114
JL
41or specify a window system process that
42.IR init (8)
3892b435 43will maintain for the terminal line.
597e0114
JL
44As flag values,
45the strings `on' and `off' specify whether
46.I init
47should execute the command
48given in the second field,
49while `secure' in addition to `on' allows root to login on
026d867c 50this line. These flag fields should not be quoted.
597e0114
JL
51The string `window=' is followed by a quoted command
52string which
53.I init
9a843f03
MK
54will execute before starting
55.IR getty .
3892b435
KM
56If the line ends in a comment, the comment is included in the
57.I ty_comment
58field of the ttyent structure.
59.PP
60Some examples:
61.PP
62.nf
9a843f03
MK
63.ta \w'console\ 'u +\w'"/etc/getty std.9600"\ \ \ 'u +\w'hp2621-nl\ \ \ \ 'u +.7i
64console "/etc/getty std.1200" vt100 on secure
65ttyd0 "/etc/getty d1200" dialup on # 555-1234
66ttyh0 "/etc/getty std.9600" hp2621-nl on # 254MC
67ttyh1 "/etc/getty std.9600" plugboard on # John's office
68ttyp0 none network
69ttyp1 none network off
70ttyv0 "/usr/new/xterm -L :0" vs100 on window="/usr/new/Xvs100 0"
3892b435
KM
71.fi
72.PP
73The first example permits root login on the console at 1200 baud,
74the second allows dialup at 1200 baud without root login,
75the third and fourth allow login at 9600 baud with terminal types of
76"hp2621-nl" and "plugboard" respectively,
77the fifth and sixth line are examples of network pseudo ttys, which
9a843f03
MK
78should not have
79.I getty
80enabled on them,
3892b435
KM
81and the last example shows a terminal emulator and window system
82startup entry.
6d85239e
KM
83.SH FILES
84/etc/ttys
85.SH "SEE ALSO"
9a843f03 86login(1), getttyent(3), gettytab(5), init(8), getty(8)