getty monitors serial lines, waiting for a connection. It then configures the serial link, sends the contents of /etc/issue, and asks the person connecting for their login name. getty then starts login and login asks the person for their password. If the user does nothing, getty or login hang up and getty goes back to waiting.
The getty command has been re-implemented numerous times. There is a wide selection of getty clones, each with slight differences in behavior and syntax. We will describe the traditional getty, and then some popular alternatives.
One of the jobs of a getty is to set the TERM environment variable to indicate the make and model of the terminal which is connecting. In this HOWTO we set the terminal to the commonly emulated DEC VT100. If you occassionally connect using a different terminal emulation then you can interactively change your choice of terminal by setting TERM to the appropiate terminal listed in /etc/termcap.
Figure 6-1. Interactively altering the connecting terminal's make and model
bash$ TERM=kermit bash$ tset -r |
A getty is also responsible for setting the time zone when a permanently-connected remote terminal is located beyond the machine's default time zone. The getty overrides the default timezone by setting the TZ environment variable. As with the TERM environment variable, a user connecting from a modem can interactively override the default time zone.
Figure 6-2. Interactively altering the connecting terminal's time zone
bash$ TZ=Australia/Adelaide bash$ export TZ |
If you do not know your time zone name, run the tzselect utility to generate the appropiate contents for TZ.
But first, let's see how getty gets started in the first place.