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.\" @(#)getty.8 8.1 (Berkeley) 6/4/93 33.\" 34.Dd June 4, 1993 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 64If the argument 65.Ar tty 66matches the first entry in one of the lines in 67.Pa /etc/fbtab 68the userid and groupid of the device list on that line is reset to root and 69wheel respectively. 70.Pp 71The 72.Ar type 73argument can be used to make 74.Nm getty 75treat the terminal line specially. 76This argument is used as an index into the 77.Nm gettytab 5 78database, to determine the characteristics of the line. 79If there is no argument, or there is no such table, the 80.Em default 81table is used. 82If there is no 83.Pa /etc/gettytab 84a set of system defaults is used. 85If indicated by the table located, 86.Nm getty 87will clear the terminal screen, 88print a banner heading, 89and prompt for a login name. 90Usually either the banner or the login prompt will include 91the system hostname. 92.Pp 93Most of the default actions of 94.Nm getty 95can be circumvented, or modified, by a suitable 96.Nm gettytab 97table. 98.Pp 99The 100.Nm getty 101program 102can be set to timeout after some interval, 103which will cause dial up lines to hang up 104if the login name is not entered reasonably quickly. 105.Sh DIAGNOSTICS 106.Bl -diag 107.It "ttyxx: No such device or address." 108.It "ttyxx: No such file or address." 109A terminal which is turned 110on in the 111.Xr ttys 112file cannot be opened, likely because the requisite 113lines are either not configured into the system, the associated device 114was not attached during boot-time system configuration, 115or the special file in 116.Pa /dev 117does not exist. 118.El 119.Sh FILES 120.Bl -tag -width /etc/gettytab -compact 121.It Pa /etc/fbtab 122.It Pa /etc/gettytab 123.El 124.Sh SEE ALSO 125.Xr fbtab 5 , 126.Xr gettytab 5 , 127.Xr init 8 , 128.Xr login 1 , 129.Xr ioctl 2 , 130.Xr tty 4 , 131.Xr ttys 5 132.Sh HISTORY 133A 134.Nm getty 135program appeared in 136.At v6 . 137