1.\" Copyright (c) 1980, 1991 Regents of the University of California. 2.\" All rights reserved. 3.\" 4.\" %sccs.include.redist.roff% 5.\" 6.\" @(#)getty.8 6.6 (Berkeley) 04/25/91 7.\" 8.Dd 9.Dt GETTY 8 10.Os BSD 4 11.Sh NAME 12.Nm getty 13.Nd set terminal mode 14.Sh SYNOPSIS 15.Nm getty 16.Oo 17.Ar type 18.Op Ar tty 19.Oc 20.Sh DESCRIPTION 21The 22.Nm getty 23program 24is called by 25.Xr init 8 26to open and initialize the tty line, read a login name, and invoke 27.Xr login 1 . 28.Pp 29The argument 30.Ar tty 31is the special device file in 32.Pa /dev 33to open for the terminal (for example, ``ttyh0''). 34If there is no argument or the argument is 35.Ql Fl , 36the tty line is assumed to be open as file descriptor 0. 37.Pp 38The 39.Ar type 40argument can be used to make 41.Nm getty 42treat the terminal line specially. 43This argument is used as an index into the 44.Nm gettytab 5 45database, to determine the characteristics of the line. 46If there is no argument, or there is no such table, the 47.Em default 48table is used. 49If there is no 50.Pa /etc/gettytab 51a set of system defaults is used. 52If indicated by the table located, 53.Nm getty 54will clear the terminal screen, 55print a banner heading, 56and prompt for a login name. 57Usually either the banner or the login prompt will include 58the system hostname. 59.Pp 60Most of the default actions of 61.Nm getty 62can be circumvented, or modified, by a suitable 63.Nm gettytab 64table. 65.Pp 66The 67.Nm getty 68program 69can be set to timeout after some interval, 70which will cause dial up lines to hang up 71if the login name is not entered reasonably quickly. 72.Sh DIAGNOSTICS 73.Bl -diag 74.It "ttyxx: No such device or address." 75.It "ttyxx: No such file or address." 76A terminal which is turned 77on in the 78.Xr ttys 79file cannot be opened, likely because the requisite 80lines are either not configured into the system, the associated device 81was not attached during boot-time system configuration, 82or the special file in 83.Pa /dev 84does not exist. 85.El 86.Sh FILES 87.Bl -tag -width /etc/gettytab -compact 88.It Pa /etc/gettytab 89.El 90.Sh SEE ALSO 91.Xr gettytab 5 , 92.Xr init 8 , 93.Xr login 1 , 94.Xr ioctl 2 , 95.Xr tty 4 , 96.Xr ttys 5 97.Sh HISTORY 98A 99.Nm getty 100program appeared in 101.At v6 . 102