]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - libexec/getty/ttys.5
Implement pci_enable_msi() and pci_disable_msi() in the LinuxKPI.
[FreeBSD/FreeBSD.git] / libexec / getty / ttys.5
1 .\" Copyright (c) 1985, 1991, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
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. Neither the name of the University nor the names of its contributors
13 .\"    may be used to endorse or promote products derived from this software
14 .\"    without specific prior written permission.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" SUCH DAMAGE.
27 .\"
28 .\"     from: @(#)ttys.5        8.1 (Berkeley) 6/4/93
29 .\" $FreeBSD$
30 .\" "
31 .Dd August 3, 2018
32 .Dt TTYS 5
33 .Os
34 .Sh NAME
35 .Nm ttys
36 .Nd terminal initialization information
37 .Sh DESCRIPTION
38 The file
39 .Nm
40 contains information that is used by various routines to initialize
41 and control the use of terminal special files.
42 Pseudo-terminals (see
43 .Xr pts 4 )
44 are not listed.
45 This information is read with the
46 .Xr getttyent 3
47 library routines.
48 There is one line in the
49 .Nm
50 file per special device file.
51 Fields are separated by tabs and/or spaces.
52 Fields comprised of more than one word should be enclosed in double
53 quotes (``"'').
54 Blank lines and comments may appear anywhere in the file; comments
55 are delimited by hash marks (``#'') and new lines.
56 Any unspecified fields will default to null.
57 .Pp
58 The first field is normally the
59 name of the terminal special file as it is found in
60 .Pa /dev .
61 However, it can be any arbitrary string
62 when the associated command is not related to a tty.
63 .Pp
64 The second field of the file is the command to execute for the line,
65 usually
66 .Xr getty 8 ,
67 which initializes and opens the line, setting the speed, waiting for
68 a user name and executing the
69 .Xr login 1
70 program.
71 It can be, however, any desired command, for example
72 the start up for a window system terminal emulator or some other
73 daemon process, and can contain multiple words if quoted.
74 .Pp
75 The third field is the type of terminal usually connected to that
76 tty line, normally the one found in the
77 .Xr termcap 5
78 data base file.
79 The environment variable
80 .Ev TERM
81 is initialized with the value by
82 either
83 .Xr getty 8
84 or
85 .Xr login 1 .
86 .Pp
87 The remaining fields set flags in the
88 .Fa ty_status
89 entry (see
90 .Xr getttyent 3 ) ,
91 specify a window system process that
92 .Xr init 8
93 will maintain for the terminal line, optionally determine the
94 type of tty (whether dialin, network or otherwise),
95 or specify a tty group
96 name that allows the login class database (see
97 .Xr login.conf 5 )
98 to refer to many ttys as a group, to selectively allow or
99 deny access or enable or disable accounting facilities for
100 ttys as a group.
101 .Pp
102 As flag values, the strings ``on'' and ``off'' specify that
103 .Xr init 8
104 should (should not) execute the command given in the second field.
105 ``onifconsole'' will cause this line to be enabled if and only if it is
106 an active kernel console device (it is equivalent to ``on'' in this
107 case).
108 The flag ``onifexists'' will cause this line to be enabled if and only
109 if the name exists.
110 If the name starts with a ``/'', it will be considered an absolute
111 path.
112 Otherwise, it is considered a path relative to
113 .Pa /dev .
114 The flag ``secure'' (if the console is enabled) allows users with a
115 uid of 0 to login on
116 this line.
117 The flag ``dialin'' indicates that a tty entry describes a dialin
118 line, and ``network'' is obsolete and does nothing.
119 Either of these strings may also be specified in the terminal type
120 field.
121 The string ``window='' may be followed by a quoted command
122 string which
123 .Xr init 8
124 will execute
125 .Em before
126 starting the command specified by the second field.
127 .Pp
128 The string ``group='' may be followed by a group name comprised of
129 alphanumeric characters that can be used by
130 .Xr login.conf 5
131 to refer to many tty lines as a group to enable or disable access
132 and accounting facilities.
133 If no group is specified, then the tty becomes a member of the group
134 "none".
135 For backwards compatibility, the ``group='' should appear last on the
136 line, immediately before the optional comment.
137 .Pp
138 Both the second field and any command specified with ``window=''
139 will be split into words and executed using
140 .Xr execve 2 .
141 Words are separated by any combinations of tabs and spaces.
142 Arguments containing whitespace should be enclosed in single quotes
143 .Pq Li ' .
144 Note that no shell-style globbing or other variable substitution occurs.
145 .Sh FILES
146 .Bl -tag -width /etc/ttys -compact
147 .It Pa /etc/ttys
148 .El
149 .Sh EXAMPLES
150 .Bd -literal
151 # root login on console at 1200 baud
152 console "/usr/libexec/getty std.1200"   vt100   on secure
153 # dialup at 1200 baud, no root logins
154 ttyd0   "/usr/libexec/getty d1200"      dialup  on group=dialup # 555-1234
155 # Mike's terminal: hp2621
156 ttyh0   "/usr/libexec/getty std.9600"   hp2621-nl       on group=dialup # 457 Evans
157 # John's terminal: vt100
158 ttyh1   "/usr/libexec/getty std.9600"   vt100   on group=dialup         # 459 Evans
159 # terminal emulate/window system
160 ttyv0   "/usr/local/bin/xterm -display :0"      xterm   on window="/usr/local/bin/X :0"
161 .Ed
162 .Sh SEE ALSO
163 .Xr login 1 ,
164 .Xr getttyent 3 ,
165 .Xr gettytab 5 ,
166 .Xr login.conf 5 ,
167 .Xr termcap 5 ,
168 .Xr getty 8 ,
169 .Xr init 8 ,
170 .Xr pam_securetty 8 ,
171 .Xr pstat 8
172 .Sh HISTORY
173 A
174 .Nm
175 file appeared in
176 .At v6 .