id:runlevels:action:process
Note: For getty or other login processes, the id field should be the tty suffix of the corresponding tty, e.g. 1 for tty1. Otherwise, the login accounting might not work correctly.
Valid actions are:
alt keycode 103 = Spawn_Console
The runlevel-field may contain multiple characters for different runlevels, e.g. 123 if the process should be started in runlevels 1, 2 and 3. ondemand-entries may contain an A, B or C. The runlevel-field of sysinit, boot and bootwait entries are ignored.
When the runlevel is changed, any running processes that are not specified for the new runlevel are killed, first with SIGTERM, then with SIGKILL.
# inittab for linux id:1:initdefault: rc::bootwait:/etc/rc 1:1:respawn:/etc/getty 9600 tty1 2:1:respawn:/etc/getty 9600 tty2 3:1:respawn:/etc/getty 9600 tty3 4:1:respawn:/etc/getty 9600 tty4
A more elaborate inittab with different runlevels (see the comments inside):
# Level to run in id:2:initdefault:
# System initialization before anything else. si::sysinit:/etc/rc.d/bcheckrc
# Runlevel 0,6 is halt and reboot, 1 is maintenance mode. l0:0:wait:/etc/rc.d/rc.halt l1:1:wait:/etc/rc.d/rc.single l2:2345:wait:/etc/rc.d/rc.multi l6:6:wait:/etc/rc.d/rc.reboot
# What to do at the "3 finger salute". ca::ctrlaltdel:/sbin/shutdown -t5 -rf now
# Runlevel 2&3: getty on console, level 3 also getty on modem port. 1:23:respawn:/sbin/getty tty1 VC linux 2:23:respawn:/sbin/getty tty2 VC linux 3:23:respawn:/sbin/getty tty3 VC linux 4:23:respawn:/sbin/getty tty4 VC linux S2:3:respawn:/sbin/uugetty ttyS2 M19200