lint
[unix-history] / usr / src / libexec / getty / ttys.5
CommitLineData
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
15The file
16.Nm ttys
17contains information that is used by various routines to initialize
452cf41c
KB
18and control the use of terminal special files.
19This information is read with the
1398e9b8 20.Xr getttyent 3
3892b435 21library routines.
1398e9b8 22The
5dc2d425 23There is one line in the
1398e9b8
CL
24.Nm ttys
25file per special device file.
3892b435 26Fields are separated by tabs and/or spaces.
452cf41c
KB
27Fields comprised of more than one word should be enclosed in double
28quotes (``"'').
29Blank lines and comments may appear anywhere in the file; comments
30are delimited by hash marks (``#'') and new lines.
31Any unspecified fields will default to null.
1398e9b8
CL
32.Pp
33The first field is the
34name of the terminal special file as it is found in
35.Pa /dev .
36.Pp
3892b435 37The second field of the file is the command to execute for the line,
1398e9b8
CL
38usually
39.Xr getty 8 ,
40which initializes and opens the line, setting the speed, waiting for
41a user name and executing the
42.Xr login 1
43program.
9a843f03 44It can be, however, any desired command, for example
597e0114 45the start up for a window system terminal emulator or some other
026d867c 46daemon process, and can contain multiple words if quoted.
1398e9b8 47.Pp
452cf41c
KB
48The third field is the type of terminal usually connected to that
49tty line, normally the one found in the
1398e9b8 50.Xr termcap 5
3892b435 51data base file.
1398e9b8
CL
52The environment variable
53.Dv TERM
54is initialized with the value by
452cf41c 55either
1398e9b8 56.Xr getty 8
452cf41c 57or
1398e9b8
CL
58.Xr login 1 .
59.Pp
597e0114 60The remaining fields set flags in the
1398e9b8 61.Fa ty_status
3892b435 62entry (see
1398e9b8 63.Xr getttyent 3 )
597e0114 64or specify a window system process that
1398e9b8 65.Xr init 8
3892b435 66will maintain for the terminal line.
1398e9b8 67.Pp
452cf41c 68As flag values, the strings ``on'' and ``off'' specify that
1398e9b8 69.Xr init
452cf41c
KB
70should (should not) execute the command given in the second field,
71while ``secure'' (if ``on'' is also specified) allows users with a
72uid of 0 to login on
73this line.
74These flag fields should not be quoted.
1398e9b8 75.Pp
452cf41c 76The string ``window='' may be followed by a quoted command
597e0114 77string which
1398e9b8 78.Xr init
452cf41c 79will execute
1398e9b8 80.Em before
452cf41c 81starting 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 85console "/usr/libexec/getty std.1200" vt100 on secure
452cf41c 86# dialup at 1200 baud, no root logins
b10a9b31 87ttyd0 "/usr/libexec/getty d1200" dialup on # 555-1234
452cf41c 88# Mike's terminal: hp2621
b10a9b31 89ttyh0 "/usr/libexec/getty std.9600" hp2621-nl on # 457 Evans
452cf41c 90# John's terminal: vt100
b10a9b31 91ttyh1 "/usr/libexec/getty std.9600" vt100 on # 459 Evans
452cf41c 92# terminal emulate/window system
b10a9b31 93ttyv0 "/usr/new/xterm -L :0" vs100 on window="/usr/new/Xvs100 0"
452cf41c 94# Network pseudo ttys -- don't enable getty
9a843f03
MK
95ttyp0 none network
96ttyp1 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
111A
112.Nm
113file appeared in
114.At v6 .