BSD 4_3_Net_2 release
[unix-history] / usr / src / libexec / getty / ttys.5
CommitLineData
af359dea 1.\" Copyright (c) 1985, 1991 The Regents of the University of California.
452cf41c
KB
2.\" All rights reserved.
3.\"
af359dea
C
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\" notice, this list of conditions and the following disclaimer in the
11.\" documentation and/or other materials provided with the distribution.
12.\" 3. All advertising materials mentioning features or use of this software
13.\" must display the following acknowledgement:
14.\" This product includes software developed by the University of
15.\" California, Berkeley and its contributors.
16.\" 4. Neither the name of the University nor the names of its contributors
17.\" may be used to endorse or promote products derived from this software
18.\" without specific prior written permission.
452cf41c 19.\"
af359dea
C
20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
6d85239e 31.\"
af359dea
C
32.\" @(#)ttys.5 6.8 (Berkeley) 5/4/91
33.\"
34.Dd May 4, 1991
35.Dt TTYS 5
36.Os
37.Sh NAME
38.Nm ttys
39.Nd terminal initialization information
40.Sh DESCRIPTION
41The file
42.Nm ttys
43contains information that is used by various routines to initialize
452cf41c
KB
44and control the use of terminal special files.
45This information is read with the
af359dea 46.Xr getttyent 3
3892b435 47library routines.
af359dea 48The
5dc2d425 49There is one line in the
af359dea
C
50.Nm ttys
51file per special device file.
3892b435 52Fields are separated by tabs and/or spaces.
452cf41c
KB
53Fields comprised of more than one word should be enclosed in double
54quotes (``"'').
55Blank lines and comments may appear anywhere in the file; comments
56are delimited by hash marks (``#'') and new lines.
57Any unspecified fields will default to null.
af359dea
C
58.Pp
59The first field is the
60name of the terminal special file as it is found in
61.Pa /dev .
62.Pp
3892b435 63The second field of the file is the command to execute for the line,
af359dea
C
64usually
65.Xr getty 8 ,
66which initializes and opens the line, setting the speed, waiting for
67a user name and executing the
68.Xr login 1
69program.
9a843f03 70It can be, however, any desired command, for example
597e0114 71the start up for a window system terminal emulator or some other
026d867c 72daemon process, and can contain multiple words if quoted.
af359dea 73.Pp
452cf41c
KB
74The third field is the type of terminal usually connected to that
75tty line, normally the one found in the
af359dea 76.Xr termcap 5
3892b435 77data base file.
af359dea
C
78The environment variable
79.Dv TERM
80is initialized with the value by
452cf41c 81either
af359dea 82.Xr getty 8
452cf41c 83or
af359dea
C
84.Xr login 1 .
85.Pp
597e0114 86The remaining fields set flags in the
af359dea 87.Fa ty_status
3892b435 88entry (see
af359dea 89.Xr getttyent 3 )
597e0114 90or specify a window system process that
af359dea 91.Xr init 8
3892b435 92will maintain for the terminal line.
af359dea 93.Pp
452cf41c 94As flag values, the strings ``on'' and ``off'' specify that
af359dea 95.Xr init
452cf41c
KB
96should (should not) execute the command given in the second field,
97while ``secure'' (if ``on'' is also specified) allows users with a
98uid of 0 to login on
99this line.
100These flag fields should not be quoted.
af359dea 101.Pp
452cf41c 102The string ``window='' may be followed by a quoted command
597e0114 103string which
af359dea 104.Xr init
452cf41c 105will execute
af359dea 106.Em before
452cf41c 107starting the command specified by the second field.
af359dea
C
108.Sh EXAMPLES
109.Bd -literal
452cf41c 110# root login on console at 1200 baud
b10a9b31 111console "/usr/libexec/getty std.1200" vt100 on secure
452cf41c 112# dialup at 1200 baud, no root logins
b10a9b31 113ttyd0 "/usr/libexec/getty d1200" dialup on # 555-1234
452cf41c 114# Mike's terminal: hp2621
b10a9b31 115ttyh0 "/usr/libexec/getty std.9600" hp2621-nl on # 457 Evans
452cf41c 116# John's terminal: vt100
b10a9b31 117ttyh1 "/usr/libexec/getty std.9600" vt100 on # 459 Evans
452cf41c 118# terminal emulate/window system
b10a9b31 119ttyv0 "/usr/new/xterm -L :0" vs100 on window="/usr/new/Xvs100 0"
452cf41c 120# Network pseudo ttys -- don't enable getty
9a843f03
MK
121ttyp0 none network
122ttyp1 none network off
af359dea
C
123.Ed
124.Sh FILES
125.Bl -tag -width /etc/ttys -compact
126.It Pa /etc/ttys
127.El
128.Sh SEE ALSO
129.Xr login 1 ,
130.Xr getttyent 3 ,
131.Xr ttyslot 3 ,
132.Xr gettytab 5 ,
133.Xr termcap 5 ,
134.Xr getty 8 ,
135.Xr init 8
136.Sh HISTORY
137A
138.Nm
139file appeared in
140.At v6 .