chiark / gitweb /
systemctl: introduce systemctl kill
[elogind.git] / man / systemd.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">
25
26         <refentryinfo>
27                 <title>systemd</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</refentrytitle>
42                 <manvolnum>1</manvolnum>
43         </refmeta>
44
45         <refnamediv>
46                 <refname>systemd</refname>
47                 <refname>init</refname>
48                 <refpurpose>systemd System and Session Manager</refpurpose>
49         </refnamediv>
50
51         <refsynopsisdiv>
52                 <cmdsynopsis>
53                         <command>systemd <arg choice="opt" rep="repeat">OPTIONS</arg></command>
54                 </cmdsynopsis>
55                 <cmdsynopsis>
56                         <command>init <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="req">COMMAND</arg></command>
57                 </cmdsynopsis>
58         </refsynopsisdiv>
59
60         <refsect1>
61                 <title>Description</title>
62
63                 <para>systemd is a system and session manager for
64                 Linux operating systems. When run as first process on
65                 boot (as PID 1), it acts as init system that brings
66                 up and maintains userspace services.</para>
67
68                 <para>For compatibility with SysV, if systemd is called
69                 as <command>init</command> and a PID that is not
70                 1, it will execute <command>telinit</command> and pass
71                 all command line arguments unmodified. That means
72                 <command>init</command> and <command>telinit</command>
73                 are mostly equivalent when invoked from normal login sessions. See
74                 <citerefentry><refentrytitle>telinit</refentrytitle><manvolnum>8</manvolnum></citerefentry>
75                 for more information.</para>
76
77                 <para>When run as system instance, systemd interprets
78                 the configuration file
79                 <filename>system.conf</filename>, otherwise
80                 <filename>session.conf</filename>. See
81                 <citerefentry><refentrytitle>systemd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
82                 for more information.</para>
83         </refsect1>
84
85         <refsect1>
86                 <title>Options</title>
87
88                 <para>The following options are understood:</para>
89
90                 <variablelist>
91                         <varlistentry>
92                                 <term><option>-h</option></term>
93                                 <term><option>--help</option></term>
94
95                                 <listitem><para>Prints a short help
96                                 text and exits.</para></listitem>
97                         </varlistentry>
98                         <varlistentry>
99                                 <term><option>--test</option></term>
100
101                                 <listitem><para>Determine startup
102                                 sequence, dump it and exit. This is an
103                                 option useful for debugging
104                                 only.</para></listitem>
105                         </varlistentry>
106                         <varlistentry>
107                                 <term><option>--dump-configuration-items</option></term>
108
109                                 <listitem><para>Dump understood unit
110                                 configuration items. This outputs a
111                                 terse but complete list of
112                                 configuration items understood in unit
113                                 definition files.</para></listitem>
114                         </varlistentry>
115                         <varlistentry>
116                                 <term><option>--introspect=</option></term>
117
118                                 <listitem><para>Extract D-Bus
119                                 interface introspection data. This is
120                                 mostly useful at install time
121                                 to generate data suitable for the
122                                 D-Bus interfaces
123                                 repository. Optionally the interface
124                                 name for the introspection data may be
125                                 specified. If omitted, the
126                                 introspection data for all interfaces
127                                 is dumped.</para></listitem>
128                         </varlistentry>
129                         <varlistentry>
130                                 <term><option>--unit=</option></term>
131
132                                 <listitem><para>Set default unit to
133                                 activate on startup. If not specified
134                                 defaults to
135                                 <filename>default.target</filename>.</para></listitem>
136                         </varlistentry>
137                         <varlistentry>
138                                 <term><option>--system</option></term>
139                                 <term><option>--session</option></term>
140
141                                 <listitem><para>Tell systemd to run a
142                                 system instance (resp. session
143                                 instance), even if the process ID is
144                                 not 1 (resp. is 1), i.e. systemd is not
145                                 (resp. is) run as init process.
146                                 Normally it should not be necessary to
147                                 pass these options, as systemd
148                                 automatically detects the mode it is
149                                 started in. These options are hence of
150                                 little use except for
151                                 debugging.</para></listitem>
152                         </varlistentry>
153                         <varlistentry>
154                                 <term><option>--dump-core</option></term>
155
156                                 <listitem><para>Dump core on crash. This switch has no effect when run as session instance.</para></listitem>
157                         </varlistentry>
158                         <varlistentry>
159                                 <term><option>--crash-shell</option></term>
160
161                                 <listitem><para>Run shell on crash. This switch has no effect when run as session instance.</para></listitem>
162                         </varlistentry>
163                         <varlistentry>
164                                 <term><option>--confirm-spawn</option></term>
165
166                                 <listitem><para>Ask for confirmation when spawning processes. This switch has no effect when run as session instance.</para></listitem>
167                         </varlistentry>
168                         <varlistentry>
169                                 <term><option>--show-status=</option></term>
170
171                                 <listitem><para>Show terse service
172                                 status information while booting. This
173                                 switch has no effect when run as
174                                 session instance. Takes a boolean
175                                 argument which may be omitted
176                                 which is interpreted as
177                                 <option>true</option>.</para></listitem>
178                         </varlistentry>
179                         <varlistentry>
180                                 <term><option>--sysv-console=</option></term>
181
182                                 <listitem><para>Controls whether
183                                 output of SysV init scripts will be
184                                 directed to the console. This switch
185                                 has no effect when run as session
186                                 instance. Takes a boolean argument
187                                 which may be omitted which is
188                                 interpreted as
189                                 <option>true</option>.</para></listitem>
190                         </varlistentry>
191                         <varlistentry>
192                                 <term><option>--log-target=</option></term>
193
194                                 <listitem><para>Set log
195                                 target. Argument must be one of
196                                 <option>console</option>,
197                                 <option>syslog</option>,
198                                 <option>kmsg</option>,
199                                 <option>syslog-or-kmsg</option>,
200                                 <option>null</option>.</para></listitem>
201                         </varlistentry>
202                         <varlistentry>
203                                 <term><option>--log-level=</option></term>
204
205                                 <listitem><para>Set log level. As
206                                 argument this accepts a numerical log
207                                 level or the well-known <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
208                                 symbolic names (lowercase):
209                                 <option>emerg</option>,
210                                 <option>alert</option>,
211                                 <option>crit</option>,
212                                 <option>err</option>,
213                                 <option>warning</option>,
214                                 <option>notice</option>,
215                                 <option>info</option>,
216                                 <option>debug</option>.</para></listitem>
217                         </varlistentry>
218                         <varlistentry>
219                                 <term><option>--log-color=</option></term>
220
221                                 <listitem><para>Highlight important
222                                 log messages. Argument is a boolean
223                                 value. If the argument is omitted it
224                                 defaults to
225                                 <option>true</option>.</para></listitem>
226                         </varlistentry>
227                         <varlistentry>
228                                 <term><option>--log-location=</option></term>
229
230                                 <listitem><para>Include code location
231                                 in log messages. This is mostly
232                                 relevant for debugging
233                                 purposes. Argument is a boolean
234                                 value. If the argument is omitted
235                                 it defaults to
236                                 <option>true</option>.</para></listitem>
237                         </varlistentry>
238                 </variablelist>
239         </refsect1>
240
241         <refsect1>
242                 <title>Concepts</title>
243
244                 <para>systemd provides a dependency system between
245                 various entities called "units". Units encapsulate
246                 various objects that are relevant for system boot-up
247                 and maintenance. The majority of units are configured
248                 in unit configuration files, whose syntax and basic
249                 set of options is described in
250                 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
251                 however some are created automatically from other
252                 configuration or dynamically from system state. Units
253                 may be 'active' (meaning started, bound, plugged in,
254                 ...  depending on the unit type, see below), or
255                 'inactive' (meaning stopped, unbound, unplugged, ...),
256                 as well as in the process of being activated or
257                 deactivated, i.e. between the two states (these states
258                 are called 'activating', 'deactivating'). A special
259                 'failed' state is available as well which is very
260                 similar to 'inactive' and is entered when the service
261                 failed in some way (process returned error code on
262                 exit, or crashed, or an operation timed out). If this
263                 state is entered the cause will be logged, for later
264                 reference. Note that the various unit types may have a
265                 number of additional substates, which are mapped to
266                 the five generalized unit states described
267                 here.</para>
268
269                 <para>The following unit types are available:</para>
270
271                 <orderedlist>
272                         <listitem><para>Service units, which control
273                         daemons and the processes they consist of. For
274                         details see
275                         <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
276
277                         <listitem><para>Socket units, which
278                         encapsulate local IPC or network sockets in
279                         the system, useful for socket-based
280                         activation. For details about socket units see
281                         <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
282                         for details on socket-based activation and
283                         other forms of activation, see
284                         <citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para></listitem>
285
286                         <listitem><para>Target units are useful to
287                         group units, or provide well-known
288                         synchronization points during boot-up, see
289                         <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
290
291                         <listitem><para>Device units expose kernel
292                         devices in systemd and may be used to
293                         implement device-based activation. For details
294                         see
295                         <citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
296
297                         <listitem><para>Mount units control mount
298                         points in the file system, for details see
299                         <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
300
301                         <listitem><para>Automount units provide
302                         automount capabilities, for on-demand mounting
303                         of file systems as well as parallelized
304                         boot-up. See
305                         <citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
306
307                         <listitem><para>Snapshot units can be used to
308                         temporarily save the state of the set of
309                         systemd units, which later may be restored by
310                         activating the saved snapshot unit. For more
311                         information see
312                         <citerefentry><refentrytitle>systemd.snapshot</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
313
314                         <listitem><para>Timer units are useful for
315                         triggering activation of other units based on
316                         timers. You may find details in
317                         <citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
318
319                         <listitem><para>Swap units are very similar to
320                         mount units and encapsulated memory swap
321                         partitions or files of the operating
322                         systemd. They are described in <citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
323
324                         <listitem><para>Path units may be used
325                         to activate other services when file system
326                         objects change or are modified. See
327                         <citerefentry><refentrytitle>systemd.path</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
328
329                 </orderedlist>
330
331                 <para>Units are named as their configuration
332                 files. Some units have special semantics. A detailed
333                 list you may find in
334                 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
335
336                 <para>systemd knows various kinds of dependencies,
337                 including positive and negative requirement
338                 dependencies (i.e. <varname>Requires=</varname> and
339                 <varname>Conflicts=</varname>) as well as ordering
340                 dependencies (<varname>After=</varname> and
341                 <varname>Before=</varname>). NB: ordering and
342                 requirement dependencies are orthogonal. If only a
343                 requirement dependency exists between two units
344                 (e.g. <filename>foo.service</filename> requires
345                 <filename>bar.service</filename>), but no ordering
346                 dependency (e.g. <filename>foo.service</filename>
347                 after <filename>bar.service</filename>) and both are
348                 requested to start, they will be started in
349                 parallel. It is a common pattern that both requirement
350                 and ordering dependencies are placed between two
351                 units. Also note that the majority of dependencies are
352                 implicitly created and maintained by systemd. In most
353                 cases it should be unnecessary to declare additional
354                 dependencies manually, however it is possible to do
355                 this.</para>
356
357                 <para>Application programs and units (via
358                 dependencies) may requests state changes of units. In
359                 systemd, these requests are encapsulated as 'jobs' and
360                 maintained in a job queue. Jobs may succeed or can
361                 fail, their execution is ordered based on the ordering
362                 dependencies of the units they have been scheduled
363                 for.</para>
364
365                 <para>On boot systemd activates the target unit
366                 <filename>default.target</filename> whose job is to
367                 activate on-boot services and other on-boot units by
368                 pulling them in via dependencies. Usually the unit
369                 name is just an alias (symlink) for either
370                 <filename>graphical.target</filename> (for
371                 fully-featured boots into the UI) or
372                 <filename>multi-user.target</filename> (for limited
373                 console-only boots for use in embedded or server
374                 environments, or similar; a subset of
375                 graphical.target). However it is at the discretion of
376                 the administrator to configure it as an alias to any
377                 other target unit. See
378                 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>
379                 for details about these target units.</para>
380
381                 <para>Processes systemd spawns are placed in
382                 individual Linux control groups named after the unit
383                 which they belong to in the private systemd
384                 hierarchy. (see <ulink
385                 url="http://www.kernel.org/doc/Documentation/cgroups/cgroups.txt">cgroups.txt</ulink>
386                 for more information about control groups, or short
387                 "cgroups"). systemd uses this to effectively keep
388                 track of processes. Control group information is
389                 maintained in the kernel, and is accessible via the
390                 file system hierarchy (beneath
391                 <filename>/sys/fs/cgroup/systemd/</filename>), or in tools
392                 such as
393                 <citerefentry><refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum></citerefentry>
394                 (<command>ps xawf -eo pid,user,cgroup,args</command>
395                 is particularly useful to list all processes and the
396                 systemd units they belong to.).</para>
397
398                 <para>systemd is compatible with the SysV init system
399                 to a large degree: SysV init scripts are supported and
400                 simply read as an alternative (though limited)
401                 configuration file format. The SysV
402                 <filename>/dev/initctl</filename> interface is
403                 provided, and compatibility implementations of the
404                 various SysV client tools are available. In addition to
405                 that, various established Unix functionality such as
406                 <filename>/etc/fstab</filename> or the
407                 <filename>utmp</filename> database are
408                 supported.</para>
409
410                 <para>systemd has a minimal transaction system: if a
411                 unit is requested to start up or shut down it will add
412                 it and all its dependencies to a temporary
413                 transaction. Then, it will verify if the transaction
414                 is consistent (i.e. whether the ordering of all units
415                 is cycle-free). If it is not, systemd will try to fix
416                 it up, and removes non-essential jobs from the
417                 transaction that might remove the loop. Also, systemd
418                 tries to suppress non-essential jobs in the
419                 transaction that would stop a running service. Finally
420                 it is checked whether the jobs of the transaction
421                 contradict jobs that have already been queued, and
422                 optionally the transaction is aborted then. If all
423                 worked out and the transaction is consistent and
424                 minimized in its impact it is merged with all already
425                 outstanding jobs and added to the run
426                 queue. Effectively this means that before executing a
427                 requested operation, systemd will verify that it makes
428                 sense, fixing it if possible, and only failing if it
429                 really cannot work.</para>
430
431                 <para>Systemd contains native implementations of
432                 various tasks that need to be executed as part of the
433                 boot process. For example, it sets the host name or
434                 configures the loopback network device. It also sets
435                 up and mounts various API file systems, such as
436                 <filename>/sys</filename> or
437                 <filename>/proc</filename>.</para>
438
439                 <para>For more information about the concepts and
440                 ideas behind systemd please refer to the <ulink
441                 url="http://0pointer.de/blog/projects/systemd.html">Original
442                 Design Document</ulink>.</para>
443
444                 <para>Note that some but not all interfaces provided
445                 by systemd are covered by the <ulink
446                 url="http://www.freedesktop.org/wiki/Software/systemd/InterfaceStabilityPromise">Interface
447                 Stability Promise</ulink>.</para>
448         </refsect1>
449
450         <refsect1>
451                 <title>Directories</title>
452
453                 <variablelist>
454                         <varlistentry>
455                                 <term>System unit directories</term>
456
457                                 <listitem><para>The systemd system
458                                 manager reads unit configuration from
459                                 various directories. Packages that
460                                 want to install unit files shall place
461                                 them in the directory returned by
462                                 <command>pkg-config systemd
463                                 --variable=systemdsystemunitdir</command>. Other
464                                 directories checked are
465                                 <filename>/usr/local/share/systemd/system</filename>
466                                 and
467                                 <filename>/usr/share/systemd/system</filename>. User
468                                 configuration always takes
469                                 precedence. <command>pkg-config
470                                 systemd
471                                 --variable=systemdsystemconfdir</command>
472                                 returns the path of the system
473                                 configuration directory. Packages
474                                 should alter the content of these
475                                 directories only with the
476                                 <command>enable</command> and
477                                 <command>disable</command> commands of
478                                 the
479                                 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
480                                 tool.</para></listitem>
481                         </varlistentry>
482                 </variablelist>
483
484                 <variablelist>
485                         <varlistentry>
486                                 <term>Session unit directories</term>
487
488                                 <listitem><para>Similar rules apply
489                                 for the session unit
490                                 directories. However, here the <ulink
491                                 url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
492                                 Base Directory specification</ulink>
493                                 is followed to find
494                                 units. Applications should place their
495                                 unit files in the directory returned
496                                 by <command>pkg-config systemd
497                                 --variable=systemdsessionunitdir</command>. Global
498                                 configuration is done in the directory
499                                 reported by <command>pkg-config
500                                 systemd
501                                 --variable=systemdsessionconfdir</command>. The
502                                 <command>enable</command> and
503                                 <command>disable</command> commands of
504                                 the
505                                 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
506                                 tool can handle both global (i.e. for
507                                 all users) and private (for one user)
508                                 enabling/disabling of
509                                 units.</para></listitem>
510                         </varlistentry>
511                 </variablelist>
512
513                 <variablelist>
514                         <varlistentry>
515                                 <term>SysV init scripts directory</term>
516
517                                 <listitem><para>The location of the
518                                 SysV init script directory varies
519                                 between distributions. If systemd
520                                 cannot find a native unit file for a
521                                 requested service, it will look for a
522                                 SysV init script of the same name
523                                 (with the
524                                 <filename>.service</filename> suffix
525                                 removed).</para></listitem>
526                         </varlistentry>
527                 </variablelist>
528
529                 <variablelist>
530                         <varlistentry>
531                                 <term>SysV runlevel link farm directory</term>
532
533                                 <listitem><para>The location of the
534                                 SysV runlevel link farm directory
535                                 varies between distributions. systemd
536                                 will take the link farm into account
537                                 when figuring out whether a service
538                                 shall be enabled. Note that a service
539                                 unit with a native unit configuration
540                                 file cannot be started by activating it
541                                 in the SysV runlevel link
542                                 farm.</para></listitem>
543                         </varlistentry>
544                 </variablelist>
545         </refsect1>
546
547         <refsect1>
548                 <title>Signals</title>
549
550                 <variablelist>
551                         <varlistentry>
552                                 <term>SIGTERM</term>
553
554                                 <listitem><para>Upon receiving this
555                                 signal the systemd system manager
556                                 serializes its state, reexecutes
557                                 itself and deserializes the saved
558                                 state again. This is mostly equivalent
559                                 to <command>systemctl
560                                 daemon-reexec</command>.</para>
561
562                                 <para>systemd session managers will
563                                 start the
564                                 <filename>exit.target</filename> unit
565                                 when this signal is received. This is
566                                 mostly equivalent to
567                                 <command>systemctl --session start
568                                 exit.target</command>.</para></listitem>
569                         </varlistentry>
570
571                         <varlistentry>
572                                 <term>SIGINT</term>
573
574                                 <listitem><para>Upon receiving this
575                                 signal the systemd system manager will
576                                 start the
577                                 <filename>ctrl-alt-del.target</filename> unit. This
578                                 is mostly equivalent to
579                                 <command>systemctl start
580                                 ctl-alt-del.target</command>.</para>
581
582                                 <para>systemd session managers
583                                 treat this signal the same way as
584                                 SIGTERM.</para></listitem>
585                         </varlistentry>
586
587                         <varlistentry>
588                                 <term>SIGWINCH</term>
589
590                                 <listitem><para>When this signal is
591                                 received the systemd system manager
592                                 will start the
593                                 <filename>kbrequest.target</filename>
594                                 unit. This is mostly equivalent to
595                                 <command>systemctl start
596                                 kbrequest.target</command>.</para>
597
598                                 <para>This signal is ignored by
599                                 systemd session
600                                 managers.</para></listitem>
601                         </varlistentry>
602
603                         <varlistentry>
604                                 <term>SIGPWR</term>
605
606                                 <listitem><para>When this signal is
607                                 received the systemd manager
608                                 will start the
609                                 <filename>sigpwr.target</filename>
610                                 unit. This is mostly equivalent to
611                                 <command>systemctl start
612                                 sigpwr.target</command>.</para></listitem>
613                         </varlistentry>
614
615                         <varlistentry>
616                                 <term>SIGUSR1</term>
617
618                                 <listitem><para>When this signal is
619                                 received the systemd manager will try
620                                 to reconnect to the D-Bus
621                                 bus.</para></listitem>
622                         </varlistentry>
623
624                         <varlistentry>
625                                 <term>SIGUSR2</term>
626
627                                 <listitem><para>When this signal is
628                                 received the systemd manager will log
629                                 its complete state in human readable
630                                 form. The data logged is the same as
631                                 printed by <command>systemctl
632                                 dump</command>.</para></listitem>
633                         </varlistentry>
634
635                         <varlistentry>
636                                 <term>SIGHUP</term>
637
638                                 <listitem><para>Reloads the complete
639                                 daemon configuration. This is mostly
640                                 equivalent to <command>systemctl
641                                 daemon-reload</command>.</para></listitem>
642                         </varlistentry>
643
644                         <varlistentry>
645                                 <term>SIGRTMIN+0</term>
646
647                                 <listitem><para>Enters default mode, starts the
648                                 <filename>default.target</filename>
649                                 unit. This is mostly equivalent to
650                                 <command>systemctl start
651                                 default.target</command>.</para></listitem>
652                         </varlistentry>
653
654                         <varlistentry>
655                                 <term>SIGRTMIN+1</term>
656
657                                 <listitem><para>Enters rescue mode,
658                                 starts the
659                                 <filename>rescue.target</filename>
660                                 unit. This is mostly equivalent to
661                                 <command>systemctl isolate
662                                 rescue.target</command>.</para></listitem>
663                         </varlistentry>
664
665                         <varlistentry>
666                                 <term>SIGRTMIN+2</term>
667
668                                 <listitem><para>Enters emergency mode,
669                                 starts the
670                                 <filename>emergency.service</filename>
671                                 unit. This is mostly equivalent to
672                                 <command>systemctl isolate
673                                 emergency.service</command>.</para></listitem>
674                         </varlistentry>
675
676                         <varlistentry>
677                                 <term>SIGRTMIN+3</term>
678
679                                 <listitem><para>Halts the machine,
680                                 starts the
681                                 <filename>halt.target</filename>
682                                 unit. This is mostly equivalent to
683                                 <command>systemctl start
684                                 halt.target</command>.</para></listitem>
685                         </varlistentry>
686
687                         <varlistentry>
688                                 <term>SIGRTMIN+4</term>
689
690                                 <listitem><para>Powers off the machine,
691                                 starts the
692                                 <filename>poweroff.target</filename>
693                                 unit. This is mostly equivalent to
694                                 <command>systemctl start
695                                 poweroff.target</command>.</para></listitem>
696                         </varlistentry>
697
698                         <varlistentry>
699                                 <term>SIGRTMIN+5</term>
700
701                                 <listitem><para>Reboots the machine,
702                                 starts the
703                                 <filename>reboot.target</filename>
704                                 unit. This is mostly equivalent to
705                                 <command>systemctl start
706                                 reboot.target</command>.</para></listitem>
707                         </varlistentry>
708                 </variablelist>
709         </refsect1>
710
711         <refsect1>
712                 <title>Environment</title>
713
714                 <variablelist>
715                         <varlistentry>
716                                 <term><varname>$SYSTEMD_LOG_LEVEL</varname></term>
717                                 <listitem><para>systemd reads the
718                                 log level from this environment
719                                 variable. This can be overridden with
720                                 <option>--log-level=</option>.</para></listitem>
721                         </varlistentry>
722
723                         <varlistentry>
724                                 <term><varname>$SYSTEMD_LOG_TARGET</varname></term>
725                                 <listitem><para>systemd reads the
726                                 log target from this environment
727                                 variable. This can be overridden with
728                                 <option>--log-target=</option>.</para></listitem>
729                         </varlistentry>
730
731                         <varlistentry>
732                                 <term><varname>$SYSTEMD_LOG_COLOR</varname></term>
733                                 <listitem><para>Controls whether
734                                 systemd highlights important log
735                                 messages. This can be overridden with
736                                 <option>--log-color=</option>.</para></listitem>
737                         </varlistentry>
738
739                         <varlistentry>
740                                 <term><varname>$SYSTEMD_LOG_LOCATION</varname></term>
741                                 <listitem><para>Controls whether
742                                 systemd prints the code location along
743                                 with log messages. This can be
744                                 overridden with
745                                 <option>--log-location=</option>.</para></listitem>
746                         </varlistentry>
747
748                         <varlistentry>
749                                 <term><varname>$XDG_CONFIG_HOME</varname></term>
750                                 <term><varname>$XDG_CONFIG_DIRS</varname></term>
751                                 <term><varname>$XDG_DATA_HOME</varname></term>
752                                 <term><varname>$XDG_DATA_DIRS</varname></term>
753
754                                 <listitem><para>The systemd session
755                                 manager uses these variables in
756                                 accordance to the <ulink
757                                 url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
758                                 Base Directory specification</ulink>
759                                 to find its configuration.</para></listitem>
760                         </varlistentry>
761
762                         <varlistentry>
763                                 <term><varname>$SYSTEMD_UNIT_PATH</varname></term>
764
765                                 <listitem><para>Controls where systemd
766                                 looks for unit
767                                 files.</para></listitem>
768                         </varlistentry>
769
770                         <varlistentry>
771                                 <term><varname>$SYSTEMD_SYSVINIT_PATH</varname></term>
772
773                                 <listitem><para>Controls where systemd
774                                 looks for SysV init scripts.</para></listitem>
775                         </varlistentry>
776
777                         <varlistentry>
778                                 <term><varname>$SYSTEMD_SYSVRCND_PATH</varname></term>
779
780                                 <listitem><para>Controls where systemd
781                                 looks for SysV init script runlevel link
782                                 farms.</para></listitem>
783                         </varlistentry>
784
785                         <varlistentry>
786                                 <term><varname>$LISTEN_PID</varname></term>
787                                 <term><varname>$LISTEN_FDS</varname></term>
788
789                                 <listitem><para>Set by systemd for
790                                 supervised processes during
791                                 socket-based activation. See
792                                 <citerefentry><refentrytitle>sd_listen_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry>
793                                 for more information.
794                                 </para></listitem>
795                         </varlistentry>
796
797                         <varlistentry>
798                                 <term><varname>$NOTIFY_SOCKET</varname></term>
799
800                                 <listitem><para>Set by systemd for
801                                 supervised processes for status and
802                                 start-up completion notification. See
803                                 <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>
804                                 for more information.
805                                 </para></listitem>
806                         </varlistentry>
807                 </variablelist>
808         </refsect1>
809
810         <refsect1>
811                 <title>Kernel Command Line</title>
812
813                 <para>When run as system instance systemd parses a few kernel command line arguments:</para>
814
815                 <variablelist>
816                         <varlistentry>
817                                 <term><varname>systemd.unit=</varname></term>
818
819                                 <listitem><para>Overrides the unit to
820                                 activate on boot. Defaults to
821                                 <filename>default.target</filename>. This
822                                 may be used to temporarily boot into a
823                                 different boot unit, for example
824                                 <filename>rescue.target</filename> or
825                                 <filename>emergency.service</filename>. See
826                                 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>
827                                 for details about these
828                                 units.</para></listitem>
829                         </varlistentry>
830
831                         <varlistentry>
832                                 <term><varname>systemd.dump_core=</varname></term>
833
834                                 <listitem><para>Takes a boolean
835                                 argument. If <option>true</option>
836                                 systemd dumps core when it
837                                 crashes. Otherwise no core dump is
838                                 created. Defaults to
839                                 <option>true</option>.</para></listitem>
840                         </varlistentry>
841
842                         <varlistentry>
843                                 <term><varname>systemd.crash_shell=</varname></term>
844
845                                 <listitem><para>Takes a boolean
846                                 argument. If <option>true</option>
847                                 systemd spawns a shell when it
848                                 crashes. Otherwise no core dump is
849                                 created. Defaults to
850                                 <option>false</option>, for security
851                                 reasons, as the shell is not protected
852                                 by any password
853                                 authentication.</para></listitem>
854                         </varlistentry>
855
856                         <varlistentry>
857                                 <term><varname>systemd.crash_chvt=</varname></term>
858
859                                 <listitem><para>Takes an integer
860                                 argument. If positive systemd
861                                 activates the specified virtual
862                                 terminal when it crashes. Defaults to
863                                 <literal>-1</literal>.</para></listitem>
864                         </varlistentry>
865
866                         <varlistentry>
867                                 <term><varname>systemd.confirm_spawn=</varname></term>
868
869                                 <listitem><para>Takes a boolean
870                                 argument. If <option>true</option>
871                                 asks for confirmation when spawning
872                                 processes. Defaults to
873                                 <option>false</option>.</para></listitem>
874                         </varlistentry>
875
876                         <varlistentry>
877                                 <term><varname>systemd.show_status=</varname></term>
878
879                                 <listitem><para>Takes a boolean
880                                 argument. If <option>true</option>
881                                 shows terse service status updates on
882                                 the console during bootup. Defaults to
883                                 <option>true</option>.</para></listitem>
884                         </varlistentry>
885
886                         <varlistentry>
887                                 <term><varname>systemd.sysv_console=</varname></term>
888
889                                 <listitem><para>Takes a boolean
890                                 argument. If <option>true</option>
891                                 output of SysV init scripts will be
892                                 directed to the console. Defaults to
893                                 <option>true</option>, unless
894                                 <option>quiet</option> is passed as
895                                 kernel command line option in which
896                                 case it defaults to
897                                 <option>false</option>.</para></listitem>
898                         </varlistentry>
899
900                         <varlistentry>
901                                 <term><varname>systemd.log_target=</varname></term>
902                                 <term><varname>systemd.log_level=</varname></term>
903                                 <term><varname>systemd.log_color=</varname></term>
904                                 <term><varname>systemd.log_location=</varname></term>
905
906                                 <listitem><para>Controls log output,
907                                 with the same effect as the
908                                 <varname>$SYSTEMD_LOG_TARGET</varname>, <varname>$SYSTEMD_LOG_LEVEL</varname>, <varname>$SYSTEMD_LOG_COLOR</varname>, <varname>$SYSTEMD_LOG_LOCATION</varname>
909                                 environment variables described above.</para></listitem>
910                         </varlistentry>
911
912                 </variablelist>
913         </refsect1>
914
915         <refsect1>
916                 <title>Sockets and FIFOs</title>
917
918                 <variablelist>
919                         <varlistentry>
920                                 <term><filename>@/org/freedesktop/systemd1/notify</filename></term>
921
922                                 <listitem><para>Daemon status
923                                 notification socket. This is an AF_UNIX
924                                 datagram socket in the Linux abstract
925                                 namespace, and is used to implement
926                                 the daemon notification logic as
927                                 implemented by
928                                 <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para></listitem>
929
930                         </varlistentry>
931
932                         <varlistentry>
933                                 <term><filename>@/org/freedesktop/systemd1/logger</filename></term>
934
935                                 <listitem><para>Used internally by the
936                                 <filename>systemd-logger.service</filename>
937                                 unit to connect STDOUT and/or STDERR
938                                 of spawned processes to
939                                 <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
940                                 or the kernel log buffer. This is an
941                                 AF_UNIX stream socket in the Linux
942                                 abstract namespace.</para></listitem>
943                         </varlistentry>
944
945                         <varlistentry>
946                                 <term><filename>@/org/freedesktop/systemd1/shutdown</filename></term>
947
948                                 <listitem><para>Used internally by the
949                                 <citerefentry><refentrytitle>shutdown</refentrytitle><manvolnum>8</manvolnum></citerefentry>
950                                 tool to implement delayed
951                                 shutdowns. This is an AF_UNIX datagram
952                                 socket in the Linux abstract
953                                 namespace.</para></listitem>
954                         </varlistentry>
955
956                         <varlistentry>
957                                 <term><filename>@/org/freedesktop/systemd1/private</filename></term>
958
959                                 <listitem><para>Used internally as
960                                 communication channel between
961                                 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
962                                 and the systemd process. This is an
963                                 AF_UNIX stream socket in the Linux
964                                 abstract namespace. This interface is
965                                 private to systemd and should not be
966                                 used in external
967                                 projects.</para></listitem>
968                         </varlistentry>
969
970                         <varlistentry>
971                                 <term><filename>/dev/initctl</filename></term>
972
973                                 <listitem><para>Limited compatibility
974                                 support for the SysV client interface,
975                                 as implemented by the
976                                 <filename>systemd-initctl.service</filename>
977                                 unit. This is a named pipe in the file
978                                 system. This interface is obsolete and
979                                 should not be used in new
980                                 applications.</para></listitem>
981                         </varlistentry>
982                 </variablelist>
983         </refsect1>
984
985         <refsect1>
986                 <title>See Also</title>
987                 <para>
988                         <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
989                         <citerefentry><refentrytitle>systemadm</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
990                         <citerefentry><refentrytitle>systemd-notify</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
991                         <citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
992                         <citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
993                         <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
994                         <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
995                         <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
996                 </para>
997         </refsect1>
998
999 </refentry>