quick-docs/en-US/modules/ref_mapping-runlevel-to-targets.adoc

31 lines
1.7 KiB
Text
Raw Normal View History

[#mapping-runlevels-to-targets]
= Mapping runlevels to targets
Systemd targets serve a similar purpose to SysVinit runlevels but act a little different. 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
|===