Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

getty(8) [mojave man page]

GETTY(8)						    BSD System Manager's Manual 						  GETTY(8)

NAME
getty -- set terminal mode SYNOPSIS
getty [type [tty]] DESCRIPTION
The getty utility is called by launchd(8) to open and initialize the tty line, read a login name, and invoke login(1). The argument tty is the special device file in /dev to open for the terminal (for example, ``ttyh0''). If there is no argument or the argu- ment is '-', the tty line is assumed to be open as file descriptor 0. The type argument can be used to make getty treat the terminal line specially. This argument is used as an index into the gettytab(5) data- base, to determine the characteristics of the line. If there is no argument, or there is no such table, the default table is used. If there is no /etc/gettytab a set of system defaults is used. If indicated by the table located, getty will clear the terminal screen, print a ban- ner heading, and prompt for a login name. Usually either the banner or the login prompt will include the system hostname. Most of the default actions of getty can be circumvented, or modified, by a suitable gettytab table. The getty utility can be set to timeout after some interval, which will cause dial up lines to hang up if the login name is not entered rea- sonably quickly. FILES
/etc/gettytab /etc/ttys DIAGNOSTICS
ttyxx: No such device or address. ttyxx: No such file or address. A terminal which is turned on in the ttys file cannot be opened, likely because the requisite lines are either not configured into the sys- tem, the associated device was not attached during boot-time system configuration, or the special file in /dev does not exist. SEE ALSO
login(1), ioctl(2), tty(4), gettytab(5), ttys(5), launchd(8) HISTORY
A getty utility appeared in Version 6 AT&T UNIX. BSD
June 4, 1993 BSD

Check Out this Related Man Page

getty(8)						      System Manager's Manual							  getty(8)

Name
       getty  - set terminal mode

Syntax
       /etc/getty [ type ] [ tty ]

Description
       The  routine  is  one  of  several ( ) by which users gain access to the ULTRIX system from a terminal.	The routine initializes a terminal
       line, reads a login name, and invokes While reading the name, the routine tries to adapt the system to the speed and type  of  terminal	on
       the line specified by the argument.

       The command typically invokes as directed by the command field in the file.

       The  routine  first tries to initialize the line.  It examines and sets up the line for local or remote connections, as appropriate.  Next,
       the routine calls to revoke access to the terminal by any background processes that could have open.  The routine then  opens  for  reading
       and writing.  File descriptors 0, 1, and 2 become the standard input, output, and diagnostic devices.  If the terminal line is connected to
       a modem, the open is not completed until someone dials up and establishes carrier on the channel.

       If a terminal exists, but an error occurs when trying to open the terminal, the routine writes a message to the system console.	 The  mes-
       sage  is repeated every 10 minutes until the terminal is available, or the entry for the terminal is modified to indicate that the terminal
       is off, and is notified by a hangup.

       The routine checks every minute to see if the terminal is still off.

       Next, the routine reads a login name, terminated by a newline or carriage-return character.  For a carriage return, the system  is  set	to
       treat carriage returns appropriately.  For further information, see

       The routine scans the user's name to see if it contains any lowercase alphabetic characters.  If it does not, and the name is nonempty, the
       system is told to map any future uppercase characters into the corresponding lowercase characters.

       Finally, calls with the user's name as an argument.

       Most of the default actions of can be changed with a suitable table.

       The routine can be set to timeout after some interval with the to variable in the table.  Thus, if the user does not  enter  a  login  name
       after a reasonable amount of time, hangs up the dialup line.

Arguments
       tty    The  special device file in the directory to open for the terminal (for example, ttyh0).	If there is no argument or the argument is
	      "+", the terminal line is assumed to be open as file descriptor 0.

       type   Used to make treat the line specially.  This argument is used as an index into the database, to determine the characteristics of the
	      line.  If there is no argument, or there is no such table, the default entry in is used.	If there is no a set of system defaults is
	      used.

	      The entry is used to define specific terminal hardware attributes such as the baud rate and number of bits per character.  Terminals
	      which  are  setup  to transmit and receive 8-bit characters must specify a gettytab entry which appropriately sets up the line.  For
	      example a terminal line setup to operate at 9600 baud with 8-bit characters may use the "8bit.9600" gettytab entry.  If  a  terminal
	      is setup to use 8-bit characters, but uses a 7-bit gettytab entry (such as "std.9600") the output from the getty program may be cor-
	      rupted.  This output corruption appears as multinational characters being generated by or programs.  When these programs operate	in
	      7-bit  mode,  the  high  order bit of the character is used as software provided parity.	This parity generation causes conventional
	      ASCII characters to be transformed into multinational characters.  By using an 8-bit gettytab entry, characters will be  transmitted
	      without any software generated parity.

	      If  indicated  by  the  table located, will clear the terminal screen, print a banner heading, and prompt for a login name.  Usually
	      either the banner or the login prompt will include the system hostname.  Then the user's name is read, a character at a time.  If  a
	      null character is received, it is assumed to be the result of the user pushing the break (interrupt) key.  The speed is usually then
	      changed and the ``login:'' prompt is displayed again.  a second break changes the speed again and redisplays the ``login:''  prompt.
	      Successive break characters cycle through some standard set of speeds.

Diagnostics
       The uses to produce diagnostic messages.  Therefore, the syslog configuration file will determine where the messages are printed.  For fur-
       ther information, see

       getty: tty: cannot open
       A terminal which is turned on in the file cannot be opened. This is probably because the requisite lines are either not configured into the
       system or the associated device was not attached during boot-time system configuration.	The syslog error logging level is LOG_ERR.

       getty: command, tty failing, open blocked
       The  routine  tried  a  non-blocking  open  of the terminal line and the open still blocked.  This can only happen on devices that have not
       implemented O_NDELAY.  For further information, see The routine tries to continue but the line may not be properly initialized.	The syslog
       error logging level is LOG_ERR.

       getty: command, tty  open failed, reason
       The  routine tried a non-blocking open of the terminal line and the open failed.  The reason is the explanation produced by the routine for
       why the open failed.  The routine tries to continue but the line may not be properly  initialized.   The  syslog  error	logging  level	is
       LOG_ERR.

       getty: in use line tty
       The Itty is in use by some other process.  The routine will not initialize a line that is already in use.  The routine will block until the
       line is no longer in use.  See and for discussions on shared lines.  The syslog error logging level is LOG_INFO.

       getty could not set pgrp, reason
       The routine tried and failed to initialize the process group of the terminal to process group 0.  See for a discussion of  process  groups.
       The reason is the explanation produced by for the failure.  The syslog error logging level is LOG_INFO.

Files
       Data base describing terminal lines

See Also
       login(1), tty(4), gettytab(5), ttys(5), init(8), syslog(8)

																	  getty(8)
Man Page