1 .\" Copyright (c) 1985, 1991, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
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.
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
32 .\" from: @(#)ttys.5 8.1 (Berkeley) 6/4/93
40 .Nd terminal initialization information
44 contains information that is used by various routines to initialize
45 and control the use of terminal special files.
46 This information is read with the
49 There is one line in the
51 file per special device file.
52 Fields are separated by tabs and/or spaces.
53 Fields comprised of more than one word should be enclosed in double
55 Blank lines and comments may appear anywhere in the file; comments
56 are delimited by hash marks (``#'') and new lines.
57 Any unspecified fields will default to null.
59 The first field is normally the
60 name of the terminal special file as it is found in
62 However, it can be any arbitrary string
63 when the associated command is not related to a tty.
65 The second field of the file is the command to execute for the line,
68 which initializes and opens the line, setting the speed, waiting for
69 a user name and executing the
72 It can be, however, any desired command, for example
73 the start up for a window system terminal emulator or some other
74 daemon process, and can contain multiple words if quoted.
76 The third field is the type of terminal usually connected to that
77 tty line, normally the one found in the
80 The environment variable
82 is initialized with the value by
88 The remaining fields set flags in the
92 specify a window system process that
94 will maintain for the terminal line, optionally determine the
95 type of tty (whether dialin, network or otherwise),
96 or specify a tty group
97 name that allows the login class database (see
99 to refer to many ttys as a group, to selectively allow or
100 deny access or enable or disable accounting facilities for
103 As flag values, the strings ``on'' and ``off'' specify that
105 should (should not) execute the command given in the second field,
106 while ``secure'' (if ``on'' is also specified) allows users with a
109 The flag ``dialin'' indicates that a tty entry describes a dialin
110 line, and ``network'' indicates that a tty entry provides a
112 Either of these strings may also be specified in the terminal type
114 The string ``window='' may be followed by a quoted command
119 starting the command specified by the second field.
121 The string ``group='' may be followed by a group name comprised of
122 alphanumeric characters that can be used by
124 to refer to many tty lines as a group to enable or disable access
125 and accounting facilities.
126 If no group is specified, then the tty becomes a member of the group
128 For backwards compatibility, the ``group='' should appear last on the
129 line, immediately before the optional comment.
131 Both the second field and any command specified with ``window=''
132 will be split into words and executed using
134 Words are separated by any combinations of tabs and spaces.
135 Arguments containing whitespace should be enclosed in single quotes
137 Note that no shell-style globbing or other variable substitution occurs.
139 .Bl -tag -width /etc/ttys -compact
144 # root login on console at 1200 baud
145 console "/usr/libexec/getty std.1200" vt100 on secure
146 # dialup at 1200 baud, no root logins
147 ttyd0 "/usr/libexec/getty d1200" dialup on group=dialup # 555-1234
148 # Mike's terminal: hp2621
149 ttyh0 "/usr/libexec/getty std.9600" hp2621-nl on group=dialup # 457 Evans
150 # John's terminal: vt100
151 ttyh1 "/usr/libexec/getty std.9600" vt100 on group=dialup # 459 Evans
152 # terminal emulate/window system
153 ttyv0 "/usr/local/bin/xterm -display :0" xterm on window="/usr/local/bin/X :0"
154 # Network pseudo ttys -- don't enable getty
155 ttyp0 none network group=pty
156 ttyp1 none network off group=pty