1.\" $OpenBSD: getty.8,v 1.13 2007/05/31 19:19:39 jmc 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: May 31 2007 $ 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, ``ttyh0''). 57If there is no argument or the argument is 58.Sq Fl , 59the tty line is assumed to be open as file descriptor 0. 60.Pp 61The 62.Ar type 63argument can be used to make 64.Nm 65treat the terminal line specially. 66This argument is used as an index into the 67.Xr gettytab 5 68database, to determine the characteristics of the line. 69If there is no argument, or there is no such table, the 70.Em default 71table is used. 72If there is no 73.Pa /etc/gettytab 74a set of system defaults is used. 75If indicated by the table located, 76.Nm 77will clear the terminal screen, 78print a banner heading, 79and prompt for a login name. 80Usually either the banner or the login prompt will include 81the system hostname. 82.Pp 83Most of the default actions of 84.Nm 85can be circumvented, or modified, by a suitable 86.Xr gettytab 5 87table. 88.Pp 89The 90.Nm 91program 92can be set to timeout after some interval, 93which will cause dial up lines to hang up 94if the login name is not entered reasonably quickly. 95.Sh RESOURCES 96.Nm 97is started by 98.Xr init 8 , 99with a process priority, umask, and resource limits based on the 100.Dq default 101entry in 102.Pa /etc/login.conf . 103.Sh FILES 104.Bl -tag -width /etc/gettytab -compact 105.It Pa /etc/gettytab 106.El 107.Sh DIAGNOSTICS 108.Bl -diag 109.It "ttyxx: No such device or address." 110.It "ttyxx: No such file or address." 111A terminal which is turned 112on in the 113.Xr ttys 5 114file cannot be opened, likely because the requisite 115lines are either not configured into the system, the associated device 116was not attached during boot-time system configuration, 117or the special file in 118.Pa /dev 119does not exist. 120.El 121.Sh SEE ALSO 122.Xr login 1 , 123.Xr ioctl 2 , 124.Xr tty 4 , 125.Xr gettytab 5 , 126.Xr login.conf 5 , 127.Xr ttys 5 , 128.Xr init 8 129.Sh HISTORY 130A 131.Nm 132program appeared in 133.At v6 . 134