The file /etc/inittab contains the background programs that used to keep the system running. One of these programs is one getty process per serial port.
Figure 6-2. getty is started by init, based upon an entry in /etc/inittab
s0:2345:respawn:/sbin/getty ttyS0 CON9600
Each field in inittab is separated by a colon and contains:
Arbitrary entry for inittab. As long as this entry doesn't appear anywhere else in inittab, you're okay. We named this entry s0 because it's for /dev/ttyS0.
Run levels where this entry gets started. Run levels 2, 3, 4 and 5 can be used for an operational system, getty should not be used in other run levels. The serial console still works in run level 1 (or single user mode) even without a getty.
Re-run the program if it dies. We want this to happen so that a new login prompt will appear when you log out of the console.
The command to run. In this case, we're telling getty to connect to /dev/ttyS0 using the settings for CON9600 which exists in /etc/gettydefs. This entry represents a terminal running at 9600bps. Initially assume that the terminal is a later-model VT100.
After changing /etc/inittab restart init with
telinit q
An alternative is to send the hangup signal to init with the command kill -HUP 1. This is not recommended: if you make a typing mistake and actually kill init then your system will suddenly halt.