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