mirror of
https://pagure.io/fedora-docs/quick-docs.git
synced 2024-12-01 07:39:48 +00:00
31 lines
1.8 KiB
Text
31 lines
1.8 KiB
Text
[#mapping-runlevels-to-targets]
|
|
= Mapping runlevels to targets
|
|
|
|
_Systemd_ targets serve a similar purpose to SysVinit runlevels but act a little differently. Each target has a name instead of a number and each serves a specific purpose. _Systemd_ implements some targets by inheriting all of the services of another target and adding additional services to it. Some _systemd_ targets mimic the common sysvinit runlevels, which means you can switch targets with the familiar `telinit RUNLEVEL` command. The runlevels assigned a specific purpose on vanilla Fedora installs (0, 1, 3, 5, and 6) have a 1:1 mapping with a specific _systemd_ target.
|
|
|
|
However, this is not the case for user-defined runlevels 2 and 4. To make use of those runlevels, create a new named _systemd_ target such as `/etc/systemd/system/$YOURTARGET` that takes one of the existing runlevels as a base, make a directory `/etc/systemd/system/$YOURTARGET.wants`, and then symlink the additional services to enable into that directory.
|
|
|
|
The following is a mapping of SysVinit runlevels to _systemd_ targets.
|
|
|
|
[cols="2,5,5",options="header"]
|
|
.Runlevel to target mapping
|
|
|===
|
|
|Sysvinit Runlevel |systemd Target |Notes
|
|
|
|
|0 |runlevel0.target, poweroff.target |Halt the system.
|
|
|
|
|1, s, single |runlevel1.target, rescue.target |Single user mode.
|
|
|
|
|2, 4 |runlevel2.target, runlevel4.target, multi-user.target
|
|
|User-defined/Site-specific runlevels. By default, identical to 3.
|
|
|
|
|3 |runlevel3.target, multi-user.target |Multi-user, non-graphical.
|
|
Users can usually login via multiple consoles or via the network.
|
|
|
|
|5 |runlevel5.target, graphical.target |Multi-user, graphical. Usually
|
|
has all the services of runlevel 3 plus a graphical login.
|
|
|
|
|6 |runlevel6.target, reboot.target |Reboot
|
|
|
|
|emergency |emergency.target |Emergency shell
|
|
|===
|