chitab Command

Purpose

Changes records in the /etc/inittab file.

Syntax

chitab {Identifier : RunLevel : Action : Command }

Description

The chitab command changes a record in the /etc/inittab file. The Identifier:Run Level:Action:Command parameter string is the new entry to the /etc/inittab file. You can search for a specific record by using fields in the Identifier portion of the parameter string. The command finds the specified Identifier and changes that record.

Note: The chitab command can not comment out an entry in the /etc/inittab file.

Parameters

The Identifier:Run Level:Action:Command parameter string specifies a record in the /etc/inittab file where the following parameters apply:

Item Description
Action A 20-character parameter that informs the init command how to process the Command parameter you specify. The init command recognizes the following actions:
boot
Read this record only when the system boots and reads the /etc/inittab file. The init command starts the process. Do not wait for the process to stop, and when it does stop, do not restart the process. The run level for this process should be the default, or it must match the run level specified by the init command at startup time.
bootwait
Read this record only when the system boots and reads the /etc/inittab file. The init command starts the process. Wait for it to stop, and when it does stop, do not restart the process.
hold
When the process identified in this record is terminated, do not start a new one. The hold action can only be activated by the phold command.
 
initdefault
Start the process identified in this record only when the init command is originally invoked. The init command uses this line to determine which run level to originally enter. It does this by taking the highest run level specified in the RunLevel field and using that as its initial state. If the RunLevel parameter is empty, this is interpreted as 0123456789, and the init command enters a run level of 9. If the init command does not find an initdefault line in the /etc/inittab file, it requests an initial run level from the operator at initial program load (IPL) time.
off
If the process identified in this record is currently running, send the warning signal SIGTERM and wait 20 seconds before sending the SIGKILL kill signal. If the process is nonexistent, ignore this line.
once
When the init command enters the run level specified for this record, start the process, do not wait for it to stop, and when it does stop, do not restart the process. If the system enters a new run level while the process is running, the process is not restarted.
 
ondemand
Functionally identical to respawn. If the process identified in this record does not exist, start the process. If the process currently exists, do nothing and continue scanning the /etc/inittab file. Specify this action to perform the respawn action when using a, b, or c run levels.
powerfail
Start the process identified in this record only when the init command receives a SIGPWR power fail signal.
powerwait
Start the process identified in this record only when the init command receives a SIGPWR power fail signal, and wait until it stops before continuing to process the /etc/inittab file.
 
respawn
If the process identified in this record does not exist, start the process. If the process currently exists, do nothing and continue scanning the /etc/inittab file.
sysinit
Start the process identified in this record before the init command tries to access the console. For example, you might use this to initialize devices.
wait
When the init command enters the run level specified for this record, start the process and wait for it to stop. While the init command is in the same run level, all subsequent reads of the /etc/inittab file ignore this object. If you are operating in a diskless environment, specifying the wait action causes your system to boot more quickly.
Command A 1024-character field specifying the shell command.
Identifier A 14-character parameter that uniquely identifies an object. The Identifier must be unique. If the Identifier is not unique, the command is unsuccessful. The Identifier cannot be changed; if you try to change it, the command is unsuccessful.
RunLevel A 20-character parameter defining the run levels in which the Identifier can be processed. Each process started by the init command can be assigned one or more run levels in which it can be started.

Security

Attention RBAC users and Trusted AIX® users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.

Examples

To change the run level of a record for tty2, enter:

chitab "tty002:23:respawn:/usr/sbin/getty /dev/tty"

The quotes are required when the record being added has spaces or tabs.

Files

Item Description
/etc/inittab Indicates which processes the init command starts.