Initial import from FreeBSD RELENG_4:
[dragonfly.git] / libexec / getty / getty.8
1 .\" Copyright (c) 1980, 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. 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.
19 .\"
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.
31 .\"
32 .\"     from: @(#)getty.8       8.1 (Berkeley) 6/4/93
33 .\" $FreeBSD: src/libexec/getty/getty.8,v 1.10.2.3 2001/08/16 10:44:15 ru Exp $
34 .\" "
35 .Dd June 4, 1993
36 .Dt GETTY 8
37 .Os
38 .Sh NAME
39 .Nm getty
40 .Nd set terminal mode
41 .Sh SYNOPSIS
42 .Nm
43 .Oo
44 .Ar type
45 .Op Ar tty
46 .Oc
47 .Sh DESCRIPTION
48 The
49 .Nm
50 program
51 is called by
52 .Xr init 8
53 to open and initialize the tty line, read a login name, and invoke
54 .Xr login 1 .
55 .Pp
56 The argument
57 .Ar tty
58 is the special device file in
59 .Pa /dev
60 to open for the terminal (for example, ``ttyh0'').
61 If there is no argument or the argument is
62 .Ql Fl ,
63 the tty line is assumed to be open as file descriptor 0.
64 .Pp
65 The
66 .Ar type
67 argument can be used to make
68 .Nm
69 treat the terminal line specially.
70 This argument is used as an index into the
71 .Xr gettytab 5
72 database, to determine the characteristics of the line.
73 If there is no argument, or there is no such table, the
74 .Em default
75 table is used.
76 If there is no
77 .Pa /etc/gettytab
78 a set of system defaults is used.
79 If indicated by the table located,
80 .Nm
81 will clear the terminal screen,
82 print a banner heading,
83 and prompt for a login name.
84 Usually either the banner or the login prompt will include
85 the system hostname.
86 .Pp
87 Most of the default actions of
88 .Nm
89 can be circumvented, or modified, by a suitable
90 .Pa gettytab
91 table.
92 .Pp
93 The
94 .Nm
95 program
96 can be set to timeout after some interval,
97 which will cause dial up lines to hang up
98 if the login name is not entered reasonably quickly.
99 .Sh DIAGNOSTICS
100 .Bl -diag
101 .It "ttyxx: No such device or address."
102 .It "ttyxx: No such file or address."
103 .Pp
104 A terminal which is turned
105 on in the
106 .Pa ttys
107 file cannot be opened, likely because the requisite
108 lines are either not configured into the system, the associated device
109 was not attached during boot-time system configuration,
110 or the special file in
111 .Pa /dev
112 does not exist.
113 .El
114 .Sh FILES
115 .Bl -tag -width /etc/gettytab -compact
116 .It Pa /etc/gettytab
117 .It Pa /etc/ttys
118 .El
119 .Sh SEE ALSO
120 .Xr login 1 ,
121 .Xr ioctl 2 ,
122 .Xr tty 4 ,
123 .Xr gettytab 5 ,
124 .Xr ttys 5 ,
125 .Xr init 8
126 .Sh HISTORY
127 A
128 .Nm
129 program appeared in
130 .At v6 .