new copyright notice
[unix-history] / usr / src / libexec / getty / getty.8
CommitLineData
3888ba97
KM
1.\" Copyright (c) 1980 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
6f6773df 5.\" @(#)getty.8 6.5 (Berkeley) %G%
3888ba97 6.\"
3c4b8728 7.TH GETTY 8 ""
3888ba97
KM
8.UC 4
9.SH NAME
10getty \- set terminal mode
11.SH SYNOPSIS
12.B /etc/getty
3f890bb2 13[ type [ tty ] ]
3888ba97
KM
14.SH DESCRIPTION
15.I Getty
3c4b8728 16is usually invoked by
3888ba97 17.IR init (8)
3f890bb2 18to open and initialize the tty line, read a login name, and invoke
3c4b8728 19.IR login (1).
3888ba97
KM
20.I getty
21attempts to adapt the system to the speed and type of terminal
22being used.
23.PP
3c4b8728
KM
24The argument
25.I tty
63c183b7 26is the special device file in /dev to open for the terminal (e.g., ``ttyh0'').
3c4b8728 27If there is no argument or the argument is
63c183b7 28``\-'', the tty line is assumed to be open as file descriptor 0.
3c4b8728
KM
29.PP
30The
31.I type
32argument can be used to make
3888ba97 33.I getty
3c4b8728 34treat the terminal line specially.
47fb95a0
KM
35This argument is used as an index into the
36.IR gettytab (5)
37database, to determine the characteristics of the line.
38If there is no argument, or there is no such table, the
39.B default
40table is used.
41If there is no
42.B /etc/gettytab
43a set of system defaults is used.
44If indicated by the table located,
45.I getty
46will clear the terminal screen,
47print a banner heading,
48and prompt for a login name.
6f6773df 49Usually either the banner or the login prompt will include
47fb95a0 50the system hostname.
3888ba97
KM
51Then the user's name is read, a character at a time.
52If a null character is received, it is assumed to be the result
53of the user pushing the `break' (`interrupt') key.
47fb95a0
KM
54The speed is usually then
55changed and the `login:' is typed again;
56a second `break' changes the speed again and the `login:'
57is typed once more.
58Successive `break' characters cycle through the
19ecbc2b 59same standard set of speeds.
3888ba97
KM
60.PP
61The user's name is terminated by a new-line or
62carriage-return character.
63The latter results in the system being set to
64treat carriage returns appropriately (see
47fb95a0 65.IR tty (4)).
3888ba97
KM
66.PP
67The user's name is scanned to see if
68it contains any lower-case alphabetic characters; if not,
69and if the name is nonempty, the
70system is told to map any future upper-case characters
71into the corresponding lower-case characters.
72.PP
3c4b8728
KM
73Finally,
74.I login
75is called with the user's name as an argument.
47fb95a0
KM
76.PP
77Most of the default actions of
78.I getty
79can be circumvented, or modified, by a suitable
80.I gettytab
81table.
82.PP
83.I Getty
84can be set to timeout after some interval,
85which will cause dial up lines to hang up
86if the login name is not entered reasonably quickly.
63c183b7
MK
87.SH DIAGNOSTICS
88\fIttyxx\fR\|\fB: No such device or address\fR.
89\fIttyxx\fR\|\fB: No such file or address\fR.
90A terminal which is turned
91on in the \fIttys\fR file cannot be opened, likely because the requisite
92lines are either not configured into the system, the associated device
93was not attached during boot-time system configuration,
94or the special file in /dev does not exist.
47fb95a0
KM
95.SH FILES
96/etc/gettytab
3888ba97 97.SH "SEE ALSO"
3f890bb2 98gettytab(5), init(8), login(1), ioctl(2), tty(4), ttys(5)