systemd-target - target unit

The basic and introductory information about Systemd can be found on the manual page systemd-start. The sections [Unit] and [Install] concerning all unit files are covered by our manual page systemd unit file.
Now the function of the unit will be explained in more detail, which is similar to the commonly known runlevels.

The different runlevels that are booted or switched to are described by systemd as target units. They have the extension “.target”.

The old sysvinit commands are still supported. (For this a quote from man systemd: “… is provided for compatibility reasons and because it is easier to type.”)

target unit description launches into an emergency shell on the main console. It is the most minimal version of a system boot to get an interactive shell. This unit can be used to guide the boot process step by step. starts the base system (including system mounts) and an emergency shell. Compared to, this target could be considered as starts a multi-user system with a working network, without graphics server X. This unit is used when you want to stop X or not to boot into it. This unit is used in special cases (when X itself or the desktop environment are upgraded) to perform a system upgrade (dist-upgrade). is the unit for multi-user mode with network capability and a running X window system. is the default unit that systemd launches at system startup. In siduction this is a symlink to (except for the noX variant).

A look at the documentation man SYSTEMD.SPECIAL(7) is mandatory to understand the relationships of the different target units.

Special features

There are three special features to be considered for the target units:

  1. The use on the kernel command line during the boot process
    In order to get into the edit mode in the boot manager Grub, you must press the e key when the boot selection appears. Then append the desired target to the kernel command line with the following syntax: “”. The table lists the kernel commands and their still valid numeric equivalents.

    target unit kernel command kernel command old - 1 3 5

    The old runlevels 2 and 4 refer to

  2. The use in the terminal during a running session
    Provided you are in a running graphical session, you can switch to the virtual terminal tty2 with the key combination CTRL+ALT+F2. Here you log in as root user. The following table lists the terminal commands, where the expression “isolate” ensures that all services not requested by the target unit are terminated.

    target unit terminal command init command alt systemctl isolate - systemctl isolate init 1 systemctl isolate init 3 systemctl isolate init 5
  3. Target units that should not be called directly
    A number of target units are used to group intermediate steps with dependencies during the boot process or the .target change. The following list shows three frequently used commands that should not be called with the syntax “isolate”.

    target terminal command init command alt
    halt systemctl halt -
    poweroff systemctl poweroff init 0
    reboot systemctl reboot init 6

    “halt”, “poweroff”, and “reboot” fetch several units in the correct order to terminate the system in an orderly fashion and to reboot if necessary.

Sources systemd-target

Last edited: 2022/04/09