[ Previous | Next | Table of Contents | Index | 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 the following at a command prompt:

mkitab Identifier:Run Level:Action:Command

For example, to add a record for tty2, type the following at a command prompt:

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 runs.
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 the following at a command prompt:

chitab Identifier:Run Level:Action:Command

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 runs.
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 the following at a command prompt:

lsitab -a

To list a specific record in the /etc/inittab file, type:

lsitab Identifier

For example, to list the record for tty2, type: lsitab tty2.

Removing Records

To remove a record from the /etc/inittab file, type the following at a command prompt:

rmitab Identifier

For example, to remove the record for tty2, type: rmitab tty2.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]