Differences between revisions 12 and 24 (spanning 12 versions)
Revision 12 as of 2009-01-04 15:44:15
Size: 1695
Editor: FranklinPiat
Comment: fix link
Revision 24 as of 2013-06-16 14:41:34
Size: 2505
Editor: DanielDorn
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: English - [[de/RunLevel|Deutsch]] - [[fr/RunLevel|Français]] - [[it/RunLevel|Italiano]]-~
----
= General =
Linux runlevel controls what processes / services are started automatically by the system (or by [[Init]] to be more exact). The runlevel is a digit from 0 to 6 or the letter S. Runlevels 0, 6 and S are reserved for shutdown, reboot and single user mode respectively. Automation is the keyword here because any of the services can be started later manually at any runlevel.
Line 3: Line 7:
||<tablestyle="width:100%;" style="width:32px;border-color:#ff9ec2" >inline:Portal/IDB/official-doc.png||<style="border-color:#ff9ec2;background-color:#ffe4f1" >[http://www.debian.org/doc/manuals/reference/#s-runlevels http://www.debian.org/doc/manuals/reference/] - Debian Reference's runlevels section||

The groups of processes or working modes of a Linux which are started by ["init"] are controlled by the runlevel. The runlevel is a digit from 0 to 6 or the letter S. Runlevels 0, 6 and S are reserved for shutdown, reboot and single user mode. Runlevel 1 is also single user mode.

I.e. Debian has seven runlevels (0-6).
Debian defines seven runlevels (0-6).
Line 10: Line 10:
 1 (single-user mode),  1 (single-user / minimal mode),
Line 15: Line 15:
Default Debian installation does not make any difference between runlevels 2-5. You may customize them to your liking. Runlevels S (single) and 1 are used for maintenance. They start services minimally to avoid possible problems.
Line 16: Line 17:
Each runlevel designates a different system configuration (/etc/rc[0-6S].d/) and allows access to different processes. = Runlevel and boot =
Your system starts with the runlevel specified in {{{/etc/inittab}}}. E.g. `id:2:initdefault:` starts the system to runlevel 2 (Default in Debian).
Line 18: Line 20:
Your system starts with the runlevel specified in /etc/inittab (which can be overridden at boot time, with kernel parameter). You may override the default runlevel with kernel parameter. When the boot menu is displayed, select the edit option. Then locate the kernel line and append space and the desired runlevel number. E.g. "`kernel /boot/vmlinuz-2.6.30 root=/dev/sda2 ro 3`" would boot to runlevel 3.
Line 20: Line 22:
See :
 * sysv-rc README files in [http://sysinf0.klabs.be/usr/share/doc/sysv-rc/ /usr/share/doc/sysv-rc/].
 * manpages : [http://manpages.debian.net/man/5/inittab inittab],[http://manpages.debian.net/man/8/init init],[http://manpages.debian.net/man/5/rcS rcS], [http://manpages.debian.net/cgi-bin/man.cgi?query=update-rc.d&format=html&locale=en update-rc.d], [http://manpages.debian.net/man/8/runlevel runlevel].
 * ''Debian Reference's'' [http://www.debian.org/doc/manuals/reference/ch-system.en.html#s-custombootscripts RunLevels Customizing].
 * ''Debian Reference's'' [http://www.debian.org/doc/manuals/reference/ch-system.en.html#s-runlevels Runlevels].
= Editing runlevels =
Runlevels can be edited manually by editing control scripts in {{{/etc/init.d}}} and symbolic links in {{{/etc/rc0.d}}} ... {{{/etc/rc6.d}}}. Please see the references below for instructions. Since manual editing gets tedious it is recommended that you use some kind of runlevel editor. In Debian install the package `sysv-rc-conf`. You may then edit the runlevels simply by opening the terminal as root and executing the named program.

= At runtime =
You may change the runlevel also at runtime. Use only levels 1-5. Use either `init [runlevel]` or `telinit [runlevel]`. Latter is preferred.

== See also ==
 * [[http://www.debian.org/doc/manuals/reference/ch03.en.html#_stage_4_the_normal_debian_system|Debian Reference's runlevels section]].
 * sysv-rc README files in [[http://sysinf0.klabs.be/usr/share/doc/sysv-rc/|/usr/share/doc/sysv-rc/]].
 * manpages : [[DebianMan:5/inittab|inittab]],[[DebianMan:8/init|init]],[[DebianMan:5/rcS|rcS]], [[DebianMan:8/update-rc.d|update-rc.d]], [[DebianMan:8/runlevel|runlevel]].

----
CategoryBootProcess

Translation(s): English - Deutsch - Français - Italiano


General

Linux runlevel controls what processes / services are started automatically by the system (or by Init to be more exact). The runlevel is a digit from 0 to 6 or the letter S. Runlevels 0, 6 and S are reserved for shutdown, reboot and single user mode respectively. Automation is the keyword here because any of the services can be started later manually at any runlevel.

Debian defines seven runlevels (0-6).

 0 (halt the system) 
 1 (single-user / minimal mode), 
 2 through 5 (multiuser modes), and 
 6 (reboot the system). 

Default Debian installation does not make any difference between runlevels 2-5. You may customize them to your liking. Runlevels S (single) and 1 are used for maintenance. They start services minimally to avoid possible problems.

Runlevel and boot

Your system starts with the runlevel specified in /etc/inittab. E.g. id:2:initdefault: starts the system to runlevel 2 (Default in Debian).

You may override the default runlevel with kernel parameter. When the boot menu is displayed, select the edit option. Then locate the kernel line and append space and the desired runlevel number. E.g. "kernel /boot/vmlinuz-2.6.30 root=/dev/sda2 ro 3" would boot to runlevel 3.

Editing runlevels

Runlevels can be edited manually by editing control scripts in /etc/init.d and symbolic links in /etc/rc0.d ... /etc/rc6.d. Please see the references below for instructions. Since manual editing gets tedious it is recommended that you use some kind of runlevel editor. In Debian install the package sysv-rc-conf. You may then edit the runlevels simply by opening the terminal as root and executing the named program.

At runtime

You may change the runlevel also at runtime. Use only levels 1-5. Use either init [runlevel] or telinit [runlevel]. Latter is preferred.

See also


CategoryBootProcess