Linux /etc/inittab Samples for Getty

Linux Getty Examples


Different distributions have a variety of names for getty. It may be necessary to experiment or consult the system documentation to determine which getty is most appropriate for your application.

 

Common Red Hat /etc/inittab getty example:

d000:2345:respawn:/sbin/getty ttyD000 DT9600 vt100

This getty uses an /etc/gettydefs file -- the DT9600 is a label from that file. Please see the /etc/gettydefs for additional options.

Example for a hard-wired terminal:
 

D000:2345:respawn:/sbin/agetty -L 9600 ttya01

Please note, the "-L" flag must be used with agetty for proper functionality if DCD is not wired on the cable.  Please exclude the "-L" flag for DCD sensitivity.

Example of an mgetty entry (recommended for modems):

G0:345:respawn:/sbin/mgetty -x5 -s 57600 ttyG0_00

IMPORTANT NOTE: Do not use mingetty for terminals, it is only designed for the system console.

Common Debian examples:

Example how to put a getty on a  direct serial line (for a terminal):

D0:345:respawn:/sbin/getty ttyD000 19200 vt100

Examples for  mgetty (modem getty) on a modem line:
 

D000:345:respawn:/sbin/mgetty -x5 -s 57600 ttyD000
G0:345:respawn:/sbin/mgetty -x5 -s 57600 ttyG0_00

Full featured mgetty controlled from /etc/mgetty/mgetty.config:

d0:345:respawn:/sbin/mgetty ttyD000

For more information on using getty, please refer to the man pages or Linux documentation source.

Last updated: Jan 01, 2024

Filed Under

Network

Recently Viewed

No recently viewed articles

Did you find this article helpful?