Visit Our UNIX and Linux User Community

Linux and UNIX Man Pages

Test Your Knowledge in Computers #797
Difficulty: Easy
The simplest arithmetic operation in binary is addition.
True or False?
Linux & Unix Commands - Search Man Pages

getty(8) [bsd man page]

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

NAME
getty - set terminal mode SYNOPSIS
getty [ type [ tty ] ] DESCRIPTION
Getty is usually invoked by init(8) to open and initialize the tty line, read a login name, and invoke login(1). getty attempts to adapt the system to the speed and type of terminal being used. The argument tty is the special device file in /dev to open for the terminal (e.g., ``ttyh0''). If there is no argument or the argument 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) database, 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 banner heading, and prompt for a login name. Usually either the banner of 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:' is typed again; a second `break' changes the speed again and the `login:' is typed once more. Successive `break' characters cycle through the same standard set of speeds. The user's name is terminated by a new-line or carriage-return character. The latter results in the system being set to treat carriage returns appropriately (see tty(4)). The user's name is scanned to see if it contains any lower-case alphabetic characters; if not, and if the name is nonempty, the system is told to map any future upper-case characters into the corresponding lower-case characters. Finally, login is called with the user's name as an argument. Most of the default actions of getty can be circumvented, or modified, by a suitable gettytab table. Getty can be set to timeout after some interval, which will cause dial up lines to hang up if the login name is not entered reasonably quickly. 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 system, the associated device was not attached during boot-time system con- figuration, or the special file in /dev does not exist. FILES
/etc/gettytab SEE ALSO
gettytab(5), init(8), login(1), ioctl(2), tty(4), ttys(5) 4th Berkeley Distribution November 17, 1996 GETTY(8)

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)

Featured Tech Videos