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