]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/systemd.unit.xml
man: document pidns containers
[thirdparty/systemd.git] / man / systemd.unit.xml
1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4
5 <!--
6 This file is part of systemd.
7
8 Copyright 2010 Lennart Poettering
9
10 systemd is free software; you can redistribute it and/or modify it
11 under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
14
15 systemd is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
22 -->
23
24 <refentry id="systemd.unit">
25
26 <refentryinfo>
27 <title>systemd.unit</title>
28 <productname>systemd</productname>
29
30 <authorgroup>
31 <author>
32 <contrib>Developer</contrib>
33 <firstname>Lennart</firstname>
34 <surname>Poettering</surname>
35 <email>lennart@poettering.net</email>
36 </author>
37 </authorgroup>
38 </refentryinfo>
39
40 <refmeta>
41 <refentrytitle>systemd.unit</refentrytitle>
42 <manvolnum>5</manvolnum>
43 </refmeta>
44
45 <refnamediv>
46 <refname>systemd.unit</refname>
47 <refpurpose>systemd unit configuration files</refpurpose>
48 </refnamediv>
49
50 <refsynopsisdiv>
51 <para><filename>systemd.service</filename>,
52 <filename>systemd.socket</filename>,
53 <filename>systemd.device</filename>,
54 <filename>systemd.mount</filename>,
55 <filename>systemd.automount</filename>,
56 <filename>systemd.swap</filename>,
57 <filename>systemd.target</filename>,
58 <filename>systemd.path</filename>,
59 <filename>systemd.timer</filename>,
60 <filename>systemd.snapshot</filename></para>
61 </refsynopsisdiv>
62
63 <refsect1>
64 <title>Description</title>
65
66 <para>A unit configuration file encodes information
67 about a service, a socket, a device, a mount point, an
68 automount point, a swap file or partition, a start-up
69 target, a file system path or a timer controlled and
70 supervised by
71 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>. The
72 syntax is inspired by <ulink
73 url="http://standards.freedesktop.org/desktop-entry-spec/latest/">XDG
74 Desktop Entry Specification</ulink> <filename>.desktop</filename> files, which are in turn
75 inspired by Microsoft Windows
76 <filename>.ini</filename> files.</para>
77
78 <para>This man pages lists the common configuration
79 options of all the unit types. These options need to
80 be configured in the [Unit] resp. [Install]
81 section of the unit files.</para>
82
83 <para>In addition to the generic [Unit] and [Install]
84 sections described here, each unit should have a
85 type-specific section, e.g. [Service] for a service
86 unit. See the respective man pages for more
87 information.</para>
88
89 <para>Unit files may contain additional options on top
90 of those listed here. If systemd encounters an unknown
91 option it will write a warning log message but
92 continue loading the unit. If an option is prefixed
93 with <option>X-</option> it is ignored completely by
94 systemd. Applications may use this to include
95 additional information in the unit files.</para>
96
97 <para>Boolean arguments used in unit files can be
98 written in various formats. For positive settings the
99 strings <option>1</option>, <option>yes</option>,
100 <option>true</option> and <option>on</option> are
101 equivalent. For negative settings the strings
102 <option>0</option>, <option>no</option>,
103 <option>false</option> and <option>off</option> are
104 equivalent.</para>
105
106 <para>Time span values encoded in unit files can be
107 written in various formats. A stand-alone number
108 specifies a time in seconds. If suffixed with a time
109 unit, the unit is honored. A concatenation of
110 multiple values with units is supported, in which case
111 the values are added up. Example: "50" refers to 50
112 seconds; "2min 200ms" refers to 2 minutes plus 200
113 milliseconds, i.e. 120200ms. The following time units
114 are understood: s, min, h, d, w, ms, us.</para>
115
116 <para>Empty lines and lines starting with # or ; are
117 ignored. This may be used for commenting. Lines ending
118 in a backslash are concatenated with the following
119 line while reading and the backslash is replaced by a
120 space character. This may be used to wrap long lines.</para>
121
122 <para>If a line starts with <option>.include</option>
123 followed by a file name, the specified file will be
124 read as if its contents were listed in place of the
125 <option>.include</option> directive.</para>
126
127 <para>Along with a unit file
128 <filename>foo.service</filename> a directory
129 <filename>foo.service.wants/</filename> may exist. All
130 units symlinked from such a directory are implicitly
131 added as dependencies of type
132 <varname>Wanted=</varname> to the unit. This is useful
133 to hook units into the start-up of other units,
134 without having to modify their unit configuration
135 files. For details about the semantics of
136 <varname>Wanted=</varname> see below. The preferred
137 way to create symlinks in the
138 <filename>.wants/</filename> directory of a service is
139 with the <command>enable</command> command of the
140 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
141 tool which reads information from the [Install]
142 section of unit files. (See below.) A similar
143 functionality exists for <varname>Requires=</varname>
144 type dependencies as well, the directory suffix is
145 <filename>.requires/</filename> in this case.</para>
146
147 <para>Note that while systemd offers a flexible
148 dependency system between units it is recommended to
149 use this functionality only sparsely and instead rely
150 on techniques such as bus-based or socket-based
151 activation which makes dependencies implicit, which
152 both results in a simpler and more flexible
153 system.</para>
154
155 <para>Some unit names reflect paths existing in the
156 file system name space. Example: a device unit
157 <filename>dev-sda.device</filename> refers to a device
158 with the device node <filename>/dev/sda</filename> in
159 the file system namespace. If this applies a special
160 way to escape the path name is used, so that the
161 result is usable as part of a file name. Basically,
162 given a path, "/" is replaced by "-", and all
163 unprintable characters and the "-" are replaced by
164 C-style "\x20" escapes. The root directory "/" is
165 encoded as single dash, while otherwise the initial
166 and ending "/" is removed from all paths during
167 transformation. This escaping is reversible.</para>
168
169 <para>Optionally, units may be instantiated from a
170 template file at runtime. This allows creation of
171 multiple units from a single configuration file. If
172 systemd looks for a unit configuration file it will
173 first search for the literal unit name in the
174 filesystem. If that yields no success and the unit
175 name contains an @ character, systemd will look for a
176 unit template that shares the same name but with the
177 instance string (i.e. the part between the @ character
178 and the suffix) removed. Example: if a service
179 <filename>getty@tty3.service</filename> is requested
180 and no file by that name is found, systemd will look
181 for <filename>getty@.service</filename> and
182 instantiate a service from that configuration file if
183 it is found. To refer to the instance string from
184 within the configuration file you may use the special
185 <literal>%i</literal> specifier in many of the
186 configuration options. Other specifiers that may be
187 used are <literal>%n</literal>, <literal>%N</literal>,
188 <literal>%p</literal>, <literal>%P</literal>,
189 <literal>%I</literal> and <literal>%f</literal>, for
190 the full unit name, the unescaped unit name, the
191 prefix name, the unescaped prefix name, the unescaped
192 instance name and the unescaped filename,
193 respectively. The unescaped filename is either the
194 unescaped instance name (if set) with / prepended (if
195 necessary), or the prefix name similarly prepended
196 with /. The prefix name here refers to the string
197 before the @, i.e. "getty" in the example above, where
198 "tty3" is the instance name.</para>
199
200 <para>If a unit file is empty (i.e. has the file size
201 0) or is symlinked to <filename>/dev/null</filename>
202 its configuration will not be loaded and it appears
203 with a load state of <literal>masked</literal>, and
204 cannot be activated. Use this as an effective way to
205 fully disable a unit, making it impossible to start it
206 even manually.</para>
207
208 <para>The unit file format is covered by the
209 <ulink
210 url="http://www.freedesktop.org/wiki/Software/systemd/InterfaceStabilityPromise">Interface
211 Stability Promise</ulink>.</para>
212 </refsect1>
213
214 <refsect1>
215 <title>Options</title>
216
217 <para>Unit file may include a [Unit] section, which
218 carries generic information about the unit that is not
219 dependent on the type of unit:</para>
220
221 <variablelist>
222
223 <varlistentry>
224 <term><varname>Description=</varname></term>
225 <listitem><para>A free-form string
226 describing the unit. This is intended
227 for use in UIs to show descriptive
228 information along with the unit
229 name.</para></listitem>
230 </varlistentry>
231
232 <varlistentry>
233 <term><varname>Requires=</varname></term>
234
235 <listitem><para>Configures requirement
236 dependencies on other units. If this
237 unit gets activated, the units listed
238 here will be activated as well. If one
239 of the other units gets deactivated or
240 its activation fails, this unit will
241 be deactivated. This option may be
242 specified more than once, in which
243 case requirement dependencies for all
244 listed names are created. Note that
245 requirement dependencies do not
246 influence the order in which services
247 are started or stopped. This has to be
248 configured independently with the
249 <varname>After=</varname> or
250 <varname>Before=</varname> options. If
251 a unit
252 <filename>foo.service</filename>
253 requires a unit
254 <filename>bar.service</filename> as
255 configured with
256 <varname>Requires=</varname> and no
257 ordering is configured with
258 <varname>After=</varname> or
259 <varname>Before=</varname>, then both
260 units will be started simultaneously
261 and without any delay between them if
262 <filename>foo.service</filename> is
263 activated. Often it is a better choice
264 to use <varname>Wants=</varname>
265 instead of
266 <varname>Requires=</varname> in order
267 to achieve a system that is more
268 robust when dealing with failing
269 services.</para></listitem>
270 </varlistentry>
271
272 <varlistentry>
273 <term><varname>RequiresOverridable=</varname></term>
274
275 <listitem><para>Similar to
276 <varname>Requires=</varname>.
277 Dependencies listed in
278 <varname>RequiresOverridable=</varname>
279 which cannot be fulfilled or fail to
280 start are ignored if the startup was
281 explicitly requested by the user. If
282 the start-up was pulled in indirectly
283 by some dependency or automatic
284 start-up of units that is not
285 requested by the user this dependency
286 must be fulfilled and otherwise the
287 transaction fails. Hence, this option
288 may be used to configure dependencies
289 that are normally honored unless the
290 user explicitly starts up the unit, in
291 which case whether they failed or not
292 is irrelevant.</para></listitem>
293
294 </varlistentry>
295 <varlistentry>
296 <term><varname>Requisite=</varname></term>
297 <term><varname>RequisiteOverridable=</varname></term>
298
299 <listitem><para>Similar to
300 <varname>Requires=</varname>
301 resp. <varname>RequiresOverridable=</varname>. However,
302 if a unit listed here is not started
303 already it will not be started and the
304 transaction fails
305 immediately.</para></listitem>
306 </varlistentry>
307
308 <varlistentry>
309 <term><varname>Wants=</varname></term>
310
311 <listitem><para>A weaker version of
312 <varname>Requires=</varname>. A unit
313 listed in this option will be started
314 if the configuring unit is. However,
315 if the listed unit fails to start up
316 or cannot be added to the transaction
317 this has no impact on the validity of
318 the transaction as a whole. This is
319 the recommended way to hook start-up
320 of one unit to the start-up of another
321 unit. Note that dependencies of this
322 type may also be configured outside of
323 the unit configuration file by
324 adding a symlink to a
325 <filename>.wants/</filename> directory
326 accompanying the unit file. For
327 details see above.</para></listitem>
328 </varlistentry>
329
330 <varlistentry>
331 <term><varname>BindTo=</varname></term>
332
333 <listitem><para>Configures requirement
334 dependencies, very similar in style to
335 <varname>Requires=</varname>, however
336 in addition to this behaviour it also
337 declares that this unit is stopped
338 when any of the units listed suddenly
339 disappears. Units can suddenly,
340 unexpectedly disappear if a service
341 terminates on its own choice, a device
342 is unplugged or a mount point
343 unmounted without involvement of
344 systemd.</para></listitem>
345 </varlistentry>
346
347 <varlistentry>
348 <term><varname>Conflicts=</varname></term>
349
350 <listitem><para>Configures negative
351 requirement dependencies. If a unit
352 has a
353 <varname>Conflicts=</varname> setting
354 on another unit, starting the former
355 will stop the latter and vice
356 versa. Note that this setting is
357 independent of and orthogonal to the
358 <varname>After=</varname> and
359 <varname>Before=</varname> ordering
360 dependencies.</para>
361
362 <para>If a unit A that conflicts with
363 a unit B is scheduled to be started at
364 the same time as B, the transaction
365 will either fail (in case both are
366 required part of the transaction) or
367 be modified to be fixed (in case one
368 or both jobs are not a required part
369 of the transaction). In the latter
370 case the job that is not the required
371 will be removed, or in case both are
372 not required the unit that conflicts
373 will be started and the unit that is
374 conflicted is
375 stopped.</para></listitem>
376 </varlistentry>
377
378 <varlistentry>
379 <term><varname>Before=</varname></term>
380 <term><varname>After=</varname></term>
381
382 <listitem><para>Configures ordering
383 dependencies between units. If a unit
384 <filename>foo.service</filename>
385 contains a setting
386 <option>Before=bar.service</option>
387 and both units are being started,
388 <filename>bar.service</filename>'s
389 start-up is delayed until
390 <filename>foo.service</filename> is
391 started up. Note that this setting is
392 independent of and orthogonal to the
393 requirement dependencies as configured
394 by <varname>Requires=</varname>. It is
395 a common pattern to include a unit
396 name in both the
397 <varname>After=</varname> and
398 <varname>Requires=</varname> option in
399 which case the unit listed will be
400 started before the unit that is
401 configured with these options. This
402 option may be specified more than
403 once, in which case ordering
404 dependencies for all listed names are
405 created. <varname>After=</varname> is
406 the inverse of
407 <varname>Before=</varname>, i.e. while
408 <varname>After=</varname> ensures that
409 the configured unit is started after
410 the listed unit finished starting up,
411 <varname>Before=</varname> ensures the
412 opposite, i.e. that the configured
413 unit is fully started up before the
414 listed unit is started. Note that when
415 two units with an ordering dependency
416 between them are shut down, the
417 inverse of the start-up order is
418 applied. i.e. if a unit is configured
419 with <varname>After=</varname> on
420 another unit, the former is stopped
421 before the latter if both are shut
422 down. If one unit with an ordering
423 dependency on another unit is shut
424 down while the latter is started up,
425 the shut down is ordered before the
426 start-up regardless whether the
427 ordering dependency is actually of
428 type <varname>After=</varname> or
429 <varname>Before=</varname>. If two
430 units have no ordering dependencies
431 between them they are shut down
432 resp. started up simultaneously, and
433 no ordering takes
434 place. </para></listitem>
435 </varlistentry>
436
437 <varlistentry>
438 <term><varname>OnFailure=</varname></term>
439
440 <listitem><para>Lists one or more
441 units that are activated when this
442 unit enters the
443 '<literal>failed</literal>'
444 state.</para></listitem>
445 </varlistentry>
446
447 <varlistentry>
448 <term><varname>StopWhenUnneeded=</varname></term>
449
450 <listitem><para>Takes a boolean
451 argument. If <option>true</option>
452 this unit will be stopped when it is
453 no longer used. Note that in order to
454 minimize the work to be executed,
455 systemd will not stop units by default
456 unless they are conflicting with other
457 units, or the user explicitly
458 requested their shut down. If this
459 option is set, a unit will be
460 automatically cleaned up if no other
461 active unit requires it. Defaults to
462 <option>false</option>.</para></listitem>
463 </varlistentry>
464
465 <varlistentry>
466 <term><varname>RefuseManualStart=</varname></term>
467 <term><varname>RefuseManualStop=</varname></term>
468
469 <listitem><para>Takes a boolean
470 argument. If <option>true</option>
471 this unit can only be activated
472 (resp. deactivated) indirectly. In
473 this case explicit start-up
474 (resp. termination) requested by the
475 user is denied, however if it is
476 started (resp. stopped) as a
477 dependency of another unit, start-up
478 (resp. termination) will succeed. This
479 is mostly a safety feature to ensure
480 that the user does not accidentally
481 activate units that are not intended
482 to be activated explicitly, and not
483 accidentally deactivate units that are
484 not intended to be deactivated.
485 These options default to
486 <option>false</option>.</para></listitem>
487 </varlistentry>
488
489 <varlistentry>
490 <term><varname>AllowIsolate=</varname></term>
491
492 <listitem><para>Takes a boolean
493 argument. If <option>true</option>
494 this unit may be used with the
495 <command>systemctl isolate</command>
496 command. Otherwise this will be
497 refused. It probably is a good idea to
498 leave this disabled except for target
499 units that shall be used similar to
500 runlevels in SysV init systems, just
501 as a precaution to avoid unusable
502 system states. This option defaults to
503 <option>false</option>.</para></listitem>
504 </varlistentry>
505
506 <varlistentry>
507 <term><varname>DefaultDependencies=</varname></term>
508
509 <listitem><para>Takes a boolean
510 argument. If <option>true</option>
511 (the default), a few default
512 dependencies will implicitly be
513 created for the unit. The actual
514 dependencies created depend on the
515 unit type. For example, for service
516 units, these dependencies ensure that
517 the service is started only after
518 basic system initialization is
519 completed and is properly terminated on
520 system shutdown. See the respective
521 man pages for details. Generally, only
522 services involved with early boot or
523 late shutdown should set this option
524 to <option>false</option>. It is
525 highly recommended to leave this
526 option enabled for the majority of
527 common units. If set to
528 <option>false</option> this option
529 does not disable all implicit
530 dependencies, just non-essential
531 ones.</para></listitem>
532 </varlistentry>
533
534 <varlistentry>
535 <term><varname>JobTimeoutSec=</varname></term>
536
537 <listitem><para>When clients are
538 waiting for a job of this unit to
539 complete, time out after the specified
540 time. If this time limit is reached
541 the job will be cancelled, the unit
542 however will not change state or even
543 enter the '<literal>failed</literal>'
544 mode. This value defaults to 0 (job
545 timeouts disabled), except for device
546 units. NB: this timeout is independent
547 from any unit-specific timeout (for
548 example, the timeout set with
549 <varname>Timeout=</varname> in service
550 units) as the job timeout has no
551 effect on the unit itself, only on the
552 job that might be pending for it. Or
553 in other words: unit-specific timeouts
554 are useful to abort unit state
555 changes, and revert them. The job
556 timeout set with this option however
557 is useful to abort only the job
558 waiting for the unit state to
559 change.</para></listitem>
560 </varlistentry>
561
562 <varlistentry>
563 <term><varname>ConditionPathExists=</varname></term>
564 <term><varname>ConditionDirectoryNotEmpty=</varname></term>
565 <term><varname>ConditionKernelCommandLine=</varname></term>
566 <term><varname>ConditionVirtualization=</varname></term>
567 <term><varname>ConditionNull=</varname></term>
568
569 <listitem><para>Before starting a unit
570 verify that the specified condition is
571 true. With
572 <varname>ConditionPathExists=</varname>
573 a file existance condition can be
574 checked before a unit is started. If
575 the specified absolute path name does
576 not exist startup of a unit will not
577 actually happen, however the unit is
578 still useful for ordering purposes in
579 this case. The condition is checked at
580 the time the queued start job is to be
581 executed. If the absolute path name
582 passed to
583 <varname>ConditionPathExists=</varname>
584 is prefixed with an exclamation mark
585 (!), the test is negated, and the unit
586 only started if the path does not
587 exist. <varname>ConditionDirectoryNotEmpty=</varname>
588 is similar to
589 <varname>ConditionPathExists=</varname>
590 but verifies whether a certain path is
591 exists and is a non-empty
592 directory. Similarly
593 <varname>ConditionKernelCommandLine=</varname>
594 may be used to check whether a
595 specific kernel command line option is
596 set (or if prefixed with the
597 exclamation mark unset). The argument
598 must either be a single word, or an
599 assignment (i.e. two words, separated
600 by the equality sign). In the former
601 case the kernel command line is
602 searched for the word appearing as is,
603 or as left hand side of an
604 assignment. In the latter case the
605 exact assignment is looked for with
606 right and left hand side
607 matching. <varname>ConditionVirtualization=</varname>
608 may be used to check whether the
609 system is executed in a virtualized
610 environment and optionally test
611 whether it is a specific
612 implementation. Takes either boolean
613 value to check if being executed in
614 any virtual environment or one of the
615 <varname>qemu</varname>,
616 <varname>kvm</varname>,
617 <varname>vmware</varname>,
618 <varname>microsoft</varname>,
619 <varname>oracle</varname>,
620 <varname>xen</varname>,
621 <varname>pidns</varname>,
622 <varname>openvz</varname> to test
623 against a specific implementation. The
624 test may be negated by prepending an
625 exclamation mark. Finally,
626 <varname>ConditionNull=</varname> may
627 be used to add a constant condition
628 check value to the unit. It takes a
629 boolean argument. If set to
630 <varname>false</varname> the condition
631 will always fail, otherwise
632 succeed. If multiple conditions are
633 specified the unit will be executed if
634 all of them apply (i.e. a logical AND
635 is applied). Condition checks can be
636 prefixed with a pipe symbol (|) in
637 which case a condition becomes a
638 triggering condition. If at least one
639 triggering condition is defined for a
640 unit then the unit will be executed if
641 at least one of the triggering
642 conditions apply and all of the
643 non-triggering conditions. If you
644 prefix an argument with the pipe
645 symbol and an exclamation mark the
646 pipe symbol must be passed first, the
647 exclamation second.</para></listitem>
648 </varlistentry>
649
650 <varlistentry>
651 <term><varname>Names=</varname></term>
652
653 <listitem><para>Additional names for
654 this unit. The names listed here must
655 have the same suffix (i.e. type) as
656 the unit file name. This option may be
657 specified more than once, in which
658 case all listed names are used. Note
659 that this option is different from the
660 <varname>Alias=</varname> option from
661 the [Install] section mentioned
662 below. See below for details. Note
663 that in almost all cases this option
664 is not what you want. A symlink alias
665 in the file system is generally
666 preferable since it can be used as
667 lookup key. If a unit with a symlinked
668 alias name is not loaded and needs to
669 be it is easily found via the
670 symlink. However, if a unit with an
671 alias name configured with this
672 setting is not loaded it will not be
673 discovered. This settings' only use is
674 in conjunction with service
675 instances.</para>
676 </listitem>
677 </varlistentry>
678 </variablelist>
679
680 <para>Unit file may include a [Install] section, which
681 carries installation information for the unit. This
682 section is not interpreted by
683 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
684 during runtime. It is used exclusively by the
685 <command>enable</command> and
686 <command>disable</command> commands of the
687 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
688 tool during installation of a unit:</para>
689
690 <variablelist>
691 <varlistentry>
692 <term><varname>Alias=</varname></term>
693
694 <listitem><para>Additional names this
695 unit shall be installed under. The
696 names listed here must have the same
697 suffix (i.e. type) as the unit file
698 name. This option may be specified
699 more than once, in which case all
700 listed names are used. At installation
701 time,
702 <command>systemctl enable</command>
703 will create symlinks from these names
704 to the unit file name. Note that this
705 is different from the
706 <varname>Names=</varname> option from
707 the [Unit] section mentioned above:
708 The names from
709 <varname>Names=</varname> apply
710 unconditionally if the unit is
711 loaded. The names from
712 <varname>Alias=</varname> apply only
713 if the unit has actually been
714 installed with the
715 <command>systemctl enable</command>
716 command. Also, if systemd searches for a
717 unit, it will discover symlinked alias
718 names as configured with
719 <varname>Alias=</varname>, but not
720 names configured with
721 <varname>Names=</varname> only. It is
722 a common pattern to list a name in
723 both options. In this case, a unit
724 will be active under all names if
725 installed, but also if not installed
726 but requested explicitly under its
727 main name.</para></listitem>
728 </varlistentry>
729
730 <varlistentry>
731 <term><varname>WantedBy=</varname></term>
732
733 <listitem><para>Installs a symlink in
734 the <filename>.wants/</filename>
735 subdirectory for a unit. This has the
736 effect that when the listed unit name
737 is activated the unit listing it is
738 activated
739 too. <command>WantedBy=foo.service</command>
740 in a service
741 <filename>bar.service</filename> is
742 mostly equivalent to
743 <command>Alias=foo.service.wants/bar.service</command>
744 in the same file.</para></listitem>
745 </varlistentry>
746
747 <varlistentry>
748 <term><varname>Also=</varname></term>
749
750 <listitem><para>Additional units to
751 install when this unit is
752 installed. If the user requests
753 installation of a unit with this
754 option configured,
755 <command>systemctl enable</command>
756 will automatically install units
757 listed in this option as
758 well.</para></listitem>
759 </varlistentry>
760 </variablelist>
761
762 </refsect1>
763
764 <refsect1>
765 <title>See Also</title>
766 <para>
767 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
768 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
769 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
770 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
771 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
772 <citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
773 <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
774 <citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
775 <citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
776 <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
777 <citerefentry><refentrytitle>systemd.path</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
778 <citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
779 <citerefentry><refentrytitle>systemd.snapshot</refentrytitle><manvolnum>5</manvolnum></citerefentry>
780 </para>
781 </refsect1>
782
783 </refentry>