1SYSTEMD.TARGET(5)               systemd.target               SYSTEMD.TARGET(5)
2
3
4

NAME

6       systemd.target - Target unit configuration
7

SYNOPSIS

9       target.target
10

DESCRIPTION

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

AUTOMATIC DEPENDENCIES

33   Implicit Dependencies
34       There are no implicit dependencies for target units.
35
36   Default Dependencies
37       The following dependencies are added unless DefaultDependencies=no is
38       set:
39
40       •   Target units will automatically complement all configured
41           dependencies of type Wants= or Requires= with dependencies of type
42           After= unless DefaultDependencies=no is set in the specified units.
43           Note that Wants= or Requires= must be defined in the target unit
44           itself — if you for example define Wants=some.target in
45           some.service, the automatic ordering will not be added.
46
47       •   Target units automatically gain Conflicts= and Before= dependencies
48           against shutdown.target.
49

OPTIONS

51       Target unit files may include [Unit] and [Install] sections, which are
52       described in systemd.unit(5). No options specific to this file type are
53       supported.
54

EXAMPLE

56       Example 1. Simple standalone target
57
58           # emergency-net.target
59
60           [Unit]
61           Description=Emergency Mode with Networking
62           Requires=emergency.target systemd-networkd.service
63           After=emergency.target systemd-networkd.service
64           AllowIsolate=yes
65
66       When adding dependencies to other units, it's important to check if
67       they set DefaultDependencies=. Service units, unless they set
68       DefaultDependencies=no, automatically get a dependency on
69       sysinit.target. In this case, both emergency.target and
70       systemd-networkd.service have DefaultDependencies=no, so they are
71       suitable for use in this target, and do not pull in sysinit.target.
72
73       You can now switch into this emergency mode by running systemctl
74       isolate emergency-net.target or by passing the option
75       systemd.unit=emergency-net.target on the kernel command line.
76
77       Other units can have WantedBy=emergency-net.target in the [Install]
78       section. After they are enabled using systemctl enable, they will be
79       started before emergency-net.target is started. It is also possible to
80       add arbitrary units as dependencies of emergency.target without
81       modifying them by using systemctl add-wants.
82

SEE ALSO

84       systemd(1), systemctl(1), systemd.unit(5), systemd.special(7),
85       systemd.directives(7)
86
87
88
89systemd 251                                                  SYSTEMD.TARGET(5)
Impressum