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