xref: /openbsd/libexec/getty/getty.8 (revision 274d7c50)
1.\"	$OpenBSD: getty.8,v 1.15 2014/11/15 14:41:03 bentley Exp $
2.\" Copyright (c) 1980, 1991, 1993
3.\"	The Regents of the University of California.  All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright
9.\"    notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\"    notice, this list of conditions and the following disclaimer in the
12.\"    documentation and/or other materials provided with the distribution.
13.\" 3. Neither the name of the University nor the names of its contributors
14.\"    may be used to endorse or promote products derived from this software
15.\"    without specific prior written permission.
16.\"
17.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27.\" SUCH DAMAGE.
28.\"
29.\"     from: @(#)getty.8	8.1 (Berkeley) 6/4/93
30.\"
31.Dd $Mdocdate: November 15 2014 $
32.Dt GETTY 8
33.Os
34.Sh NAME
35.Nm getty
36.Nd set terminal mode
37.Sh SYNOPSIS
38.Nm getty
39.Oo
40.Ar type
41.Op Ar tty
42.Oc
43.Sh DESCRIPTION
44The
45.Nm
46program
47is called by
48.Xr init 8
49to open and initialize the tty line, read a login name, and invoke
50.Xr login 1 .
51.Pp
52The argument
53.Ar tty
54is the special device file in
55.Pa /dev
56to open for the terminal (for example,
57.Pa ttyh0 ) .
58If there is no argument or the argument is
59.Sq - ,
60the tty line is assumed to be open as file descriptor 0.
61.Pp
62The
63.Ar type
64argument can be used to make
65.Nm
66treat the terminal line specially.
67This argument is used as an index into the
68.Xr gettytab 5
69database, to determine the characteristics of the line.
70If there is no argument, or there is no such table, the
71.Em default
72table is used.
73If there is no
74.Pa /etc/gettytab
75a set of system defaults is used.
76If indicated by the table located,
77.Nm
78will clear the terminal screen,
79print a banner heading,
80and prompt for a login name.
81Usually either the banner or the login prompt will include
82the system hostname.
83.Pp
84Most of the default actions of
85.Nm
86can be circumvented, or modified, by a suitable
87.Xr gettytab 5
88table.
89.Pp
90The
91.Nm
92program
93can be set to timeout after some interval,
94which will cause dial up lines to hang up
95if the login name is not entered reasonably quickly.
96.Sh RESOURCES
97.Nm
98is started by
99.Xr init 8 ,
100with a process priority, umask, and resource limits based on the
101.Dq default
102entry in
103.Pa /etc/login.conf .
104.Sh FILES
105.Bl -tag -width /etc/gettytab -compact
106.It Pa /etc/gettytab
107.El
108.Sh DIAGNOSTICS
109.Bl -diag
110.It "ttyxx: No such device or address."
111.It "ttyxx: No such file or address."
112A terminal which is turned
113on in the
114.Xr ttys 5
115file cannot be opened, likely because the requisite
116lines are either not configured into the system, the associated device
117was not attached during boot-time system configuration,
118or the special file in
119.Pa /dev
120does not exist.
121.El
122.Sh SEE ALSO
123.Xr login 1 ,
124.Xr ioctl 2 ,
125.Xr tty 4 ,
126.Xr gettytab 5 ,
127.Xr login.conf 5 ,
128.Xr ttys 5 ,
129.Xr init 8
130.Sh HISTORY
131A
132.Nm
133program appeared in
134.At v6 .
135