NAME | SYNOPSIS | DESCRIPTION | AUTOMATIC DEPENDENCIES | EXAMPLE | SEE ALSO | COLOPHON

SYSTEMD.TARGET(5)              systemd.target              SYSTEMD.TARGET(5)

NAME         top

       systemd.target - Target unit configuration

SYNOPSIS         top

       target.target

DESCRIPTION         top

       A unit configuration file whose name ends in ".target" encodes
       information about a target unit of systemd, which is used for
       grouping units and as well-known synchronization points during
       start-up.
       This unit type has no specific options. See systemd.unit(5) for the
       common options of all unit configuration files. The common
       configuration items are configured in the generic [Unit] and
       [Install] sections. A separate [Target] section does not exist, since
       no target-specific options may be configured.
       Target units do not offer any additional functionality on top of the
       generic functionality provided by units. They exist merely to group
       units via dependencies (useful as boot targets), and to establish
       standardized names for synchronization points used in dependencies
       between units. Among other things, target units are a more flexible
       replacement for SysV runlevels in the classic SysV init system. (And
       for compatibility reasons special target units such as
       runlevel3.target exist which are used by the SysV runlevel
       compatibility code in systemd. See systemd.special(7) for details).

AUTOMATIC DEPENDENCIES         top

       Unless DefaultDependencies= is set to no in either of related units
       or an explicit ordering dependency is already defined, target units
       will implicitly complement all configured dependencies of type Wants=
       or Requires= with dependencies of type After=. Note that Wants= or
       Requires= must be defined in the target unit itself — if you for
       example define Wants=some.target in some.service, the implicit
       ordering will not be added.
       All target units automatically gain Conflicts= dependency against
       shutdown.target unless DefaultDependencies= is set to no.

EXAMPLE         top

       Example 1. Simple standalone target
           # emergency-net.target
           [Unit]
           Description=Emergency Mode with Networking
           Requires=emergency.target systemd-networkd.service
           After=emergency.target systemd-networkd.service
           AllowIsolate=yes
       When adding dependencies to other units, it's important to check if
       they set DefaultDependencies=. Service units, unless they set
       DefaultDependencies=no, automatically get a dependency on
       sysinit.target. In this case, both emergency.target and
       systemd-networkd.service have DefaultDependencies=no, so they are
       suitable for use in this target, and do not pull in sysinit.target.
       You can now switch into this emergency mode by running systemctl
       isolate emergency-net.target or by passing the option
       systemd.unit=emergency-net.target on the kernel command line.
       Other units can have WantedBy=emergency-net.target in the [Install]
       section. After they are enabled using systemctl enable, they will be
       started before emergency-net.target is started. It is also possible
       to add arbitrary units as dependencies of emergency.target without
       modifying them by using systemctl add-wants.

SEE ALSO         top

       systemd(1), systemctl(1), systemd.unit(5), systemd.special(7),
       systemd.directives(7)

COLOPHON         top

       This page is part of the systemd (systemd system and service manager)
       project.  Information about the project can be found at 
       ⟨http://www.freedesktop.org/wiki/Software/systemd⟩.  If you have a bug
       report for this manual page, see 
       ⟨http://www.freedesktop.org/wiki/Software/systemd/#bugreports⟩.  This
       page was obtained from the project's upstream Git repository 
       ⟨https://github.com/systemd/systemd.git⟩ on 2017-07-05.  If you dis‐
       cover any rendering problems in this HTML version of the page, or you
       believe there is a better or more up-to-date source for the page, or
       you have corrections or improvements to the information in this
       COLOPHON (which is not part of the original manual page), send a mail
       to man-pages@man7.org
systemd 234                                                SYSTEMD.TARGET(5)

Pages that refer to this page: systemctl(1)systemd(1)systemd.unit(5)bootup(7)systemd.directives(7)systemd.index(7)systemd.special(7)lvm2-activation-generator(8)runlevel(8)systemd-sysv-generator(8)