Библиотека сайта или "Мой Linux Documentation Project"
A run level is a state of init and the whole system that defines what system services are operating. Run levels are identified by numbers. Some system administrators use run levels to define which subsystems are working, e.g., whether X is running, whether the network is operational, and so on. Others have all subsystems always running or start and stop them individually, without changing run levels, since run levels are too coarse for controlling their systems. You need to decide for yourself, but it might be easiest to follow the way your Linux distribution does things.
The following table defines how most Linux Distributions define the different run levels. However, run-levels 2 through 5 can be modified to suit your own tastes.
Table 9-1. Run level numbers
|0||Halt the system.|
|1||Single-user mode (for special administration).|
|2||Local Multiuser with Networking but without network service (like NFS)|
|3||Full Multiuser with Networking|
|5||Full Multiuser with Networking and X Windows(GUI)|
Services that get started at a certain runtime are determined
by the contents of the various
Most distributions locate these directories either at
/etc/rcN.d. (Replace the N with the run-level
In each run-level you will find a series of if links pointing
to start-up scripts located in
The names of these links all start as either K or S, followed by a
number. If the name of the link starts with an S, then that indicates
the service will be started when you go into that run level. If the
name of the link starts with a K, the service will be killed (if
/etc/init.d/rc3.dmay look like.
/etc/inittabby lines like the following:
/etc/init.d/rccommand runs whatever commands are necessary to start and stop services to enter run level 2.
The command in the fourth field does all the hard work of setting up a run level. It starts services that aren't already running, and stops services that shouldn't be running in the new run level any more. Exactly what the command is, and how run levels are configured, depends on the Linux distribution.
/etc/inittabthat specifies the default run level:
emergency. Kernel command line arguments can be given via LILO, for example. This allows you to choose the single user mode (run level 1).
While the system is running, the telinit
command can change the run level. When the run level is
changed, init runs the relevant command from
|Configuring init to start
||Up||Special configuration in
Только зарегистрированные пользователи могут оценивать и комментировать статьи.