Runlevel

The term runlevel refers to a mode of computers. He has significance especially when the operating system starts. The run is mainly for Unix operating systems known, but also with other operating systems available.

General

Many operating systems through when starting (booting) a plurality of stepped system states, or start in a certain state, the runlevel. Each runlevel is assigned certain system services that are started at boot time as processes in well-defined sequence within the operating system. In this manner, resources of the computer gradually put into operation. Upon termination of the operating system ( shutdown) are run through the runlevels in reverse order, the running processes are gradually completed until the computer can be turned off. In addition, can also be made direct change from one runlevel to another.

Runlevel is known primarily from the different Unix systems such as Solaris ( prior to Solaris 10), GNU / Linux, HP- UX or AIX. However, in Windows the boot options correspond Safe Mode, Safe Mode with Networking or Windows normally start in the Windows boot menu exactly one runlevel. Solaris 10 uses runlevel only rudimentary, the main system control is done there by the Service Management Facility (SMF ).

Idea of the different runlevels is to provide levels of security, in which only certain system processes are running. This is important, for example, if a system is infected by computer viruses and should run without a network connection.

In contrast to the more oriented to System V Unix operating systems, the BSDs know only two Runlevel: single -user and multi-user.

Example Linux

All system services that should be started within a certain runlevels are defined in the file / etc / inittab. This file is processed by the system program / ​​sbin / init. When initializing a runlevel ( change to a higher runlevel ) the designated services are automatically started. The processes Conversely, at the completion of a run is automatically stopped and system resources ( memory, ports, etc. ) enabled. A fairly popular configuration is given in the following table configurations, however, differ from distribution to distribution and are not set:

The above- mentioned program init can be used by privileged users also for changing the runlevel. According to the can level up again given in the table with / sbin / init 0 to shut down the system or reboot with / sbin / init 6. To determine the current runlevel is shipped with most distributions, the command / sbin / runlevel and / or the environment variable RUNLEVEL available (or System V who- r).

Example Solaris

All system services are also defined in the / etc / inittab file. For each runlevel are on Solaris, in contrast to Linux, the following definitions:

697329
de