[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
System Management Guide: Operating System and Devices

Changing the /etc/inittab File

This section contains procedures for using the four commands (chitab, lsitab, mkitab, and rmitab) that modify the records in the etc/inittab file.

Adding Records - mkitab Command

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.

Changing Records - chitab Command

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.

Listing Records - lsitab Command

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.

Removing Records

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.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]