This section contains procedures for using the four commands (chitab, lsitab, mkitab, and rmitab) that modify the records in the etc/inittab file.
To add a record to the /etc/inittab file, type:
mkitab Identifier:Run Level:Action:Command
then press Enter. For example, to add a record for tty2, type:
mkitab tty002:2:respawn:/usr/sbin/getty /dev/tty2
In the above example:
tty002 | Identifies the object whose run level you are defining. |
2 | Specifies the run level at which this process should run. |
respawn | Specifies the action that the init command should take for this process. |
/usr/sbin/getty /dev/tty2 | Specifies the shell command to be executed. |
To change a record to the /etc/inittab file, type:
chitab Identifier:Run Level:Action:Command
then press Enter. For example, to change a record for tty2 so that this process runs at run levels 2 and 3, type:
chitab tty002:23:respawn:/usr/sbin/getty /dev/tty2
In the above example:
tty002 | Identifies the object whose run level you are defining. |
23 | Specifies the run levels at which this process should run. |
respawn | Specifies the action that the init command should take for this process. |
/usr/sbin/getty /dev/tty2 | Specifies the shell command to be executed. |
To list all records in the /etc/inittab file, type:
lsitab -a
then press Enter.
To list a specific record in the /etc/inittab file, type:
lsitab Identifier
then press Enter.
For example, to list the record for tty2, type: lsitab tty2.
To remove a record from the /etc/inittab file, type:
rmitab Identifier
then press Enter. For example, to remove the record for tty2, type: rmitab tty2.