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