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