Consultor Eletrônico



Kbase P113442: What are UNIX run levels?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   16/10/2008
Status: Unverified

GOAL:

What are UNIX run levels?

GOAL:

What commands are run at a particular UNIX run level?

GOAL:

What is the UNIX /etc/inittab file?

FIX:

The /etc/inittab file describes one or more states, called run levels, that the system may enter. These run levels are not defined in the operating system kernel or referenced by any system calls. These run levels are for the benefit of the init process.

For each run level, the /etc/inittab file designates which commands are to be executed when the system enters that particular run level.

The following is a typical assignment of run levels:

0: Run level 0 is often used to perform a general shutdown of the system. Users are warned to log out; file systems are unmounted; daemon
processes are terminated; system activity is quiesced; and, if possible, the machine is instructed to turn itself off.

1: The commands for single-user mode usually are designed to switch from multi-user to single-user mode and therefore include command to kill the
standard background processes, unmount file systems, and essentially undo most of what happens when the system enters state 2. Note:
This state is not the same as state S - which is defined internally and is not dependent on the file /etc/inittab.

2: Run mode 2, the multi-user state, is usually designated as the state init is to enter immediately after system bootstrap procedure is completed.
This state mounts the user file systems, starts up the normal daemon processes, and initiates a getty process for each user terminal.

3,4: These states are often used for alternative multl-user environments. For example, on systems that are part of a network, state 3 may be the
full networked state, which would perform all tasks state 2 does and also initiate the network server and client processes.

5: On systems that have a firmware debugger, this state could be used to preform a complete shutdown and then transfer control to the
debugger.

6: This state usually is defined as a down-and-up state; that is, the system is completely shut down, as for state 0, and then restarted as if from a
cold power off condition. This state is intended for use in testing a new kernel or in performing a periodic system reboot without human
intervention.