]>
Commit | Line | Data |
---|---|---|
7874bcd6 LP |
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 | ||
ee5762e3 | 24 | <refentry id="systemctl"> |
7874bcd6 LP |
25 | |
26 | <refentryinfo> | |
27 | <title>systemctl</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>systemctl</refentrytitle> | |
42 | <manvolnum>1</manvolnum> | |
43 | </refmeta> | |
44 | ||
45 | <refnamediv> | |
46 | <refname>systemctl</refname> | |
af2d49f7 | 47 | <refpurpose>Control the systemd system and service manager</refpurpose> |
7874bcd6 LP |
48 | </refnamediv> |
49 | ||
50 | <refsynopsisdiv> | |
51 | <cmdsynopsis> | |
52 | <command>systemctl <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="req">COMMAND</arg> <arg choice="opt" rep="repeat">NAME</arg></command> | |
53 | </cmdsynopsis> | |
54 | </refsynopsisdiv> | |
55 | ||
56 | <refsect1> | |
57 | <title>Description</title> | |
58 | ||
59 | <para><command>systemctl</command> may be used to | |
60 | introspect and control the state of the | |
61 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry> | |
af2d49f7 | 62 | system and service manager.</para> |
7874bcd6 LP |
63 | </refsect1> |
64 | ||
65 | <refsect1> | |
66 | <title>Options</title> | |
67 | ||
68 | <para>The following options are understood:</para> | |
69 | ||
70 | <variablelist> | |
71 | <varlistentry> | |
72 | <term><option>--help</option></term> | |
7594fb25 | 73 | <term><option>-h</option></term> |
7874bcd6 LP |
74 | |
75 | <listitem><para>Prints a short help | |
76 | text and exits.</para></listitem> | |
77 | </varlistentry> | |
78 | ||
59cddb23 LP |
79 | <varlistentry> |
80 | <term><option>--version</option></term> | |
81 | ||
82 | <listitem><para>Prints a short version | |
83 | string and exits.</para></listitem> | |
84 | </varlistentry> | |
85 | ||
7874bcd6 LP |
86 | <varlistentry> |
87 | <term><option>--type=</option></term> | |
7594fb25 | 88 | <term><option>-t</option></term> |
7874bcd6 LP |
89 | |
90 | <listitem><para>When listing units, | |
91 | limit display to certain unit | |
92 | types. If not specified units of all | |
93 | types will be shown. The argument | |
94 | should be a unit type name such as | |
95 | <option>service</option>, | |
96 | <option>socket</option> and | |
97 | similar.</para></listitem> | |
98 | </varlistentry> | |
99 | ||
393a2f9b LP |
100 | <varlistentry> |
101 | <term><option>--property=</option></term> | |
102 | <term><option>-p</option></term> | |
103 | ||
104 | <listitem><para>When showing | |
a61933ad | 105 | unit/job/manager properties, limit |
ee5762e3 LP |
106 | display to certain properties as |
107 | specified as argument. If not | |
108 | specified all set properties are | |
393a2f9b LP |
109 | shown. The argument should be a |
110 | property name, such as | |
ea4a240d LP |
111 | <literal>MainPID</literal>. If |
112 | specified more than once all | |
113 | properties with the specified names | |
114 | are shown.</para></listitem> | |
393a2f9b LP |
115 | </varlistentry> |
116 | ||
7874bcd6 LP |
117 | <varlistentry> |
118 | <term><option>--all</option></term> | |
7594fb25 | 119 | <term><option>-a</option></term> |
7874bcd6 LP |
120 | |
121 | <listitem><para>When listing units, | |
122 | show all units, regardless of their | |
393a2f9b | 123 | state, including inactive units. When |
a61933ad | 124 | showing unit/job/manager properties, |
393a2f9b LP |
125 | show all properties regardless whether |
126 | they are set or not.</para></listitem> | |
7874bcd6 LP |
127 | </varlistentry> |
128 | ||
30732560 LP |
129 | <varlistentry> |
130 | <term><option>--failed</option></term> | |
131 | ||
132 | <listitem><para>When listing units, | |
133 | show only failed units. Do not confuse | |
134 | with | |
135 | <option>--fail</option>.</para></listitem> | |
136 | </varlistentry> | |
137 | ||
8fe914ec LP |
138 | <varlistentry> |
139 | <term><option>--full</option></term> | |
140 | ||
141 | <listitem><para>Do not ellipsize unit | |
f73e33d9 LP |
142 | names and truncate unit descriptions |
143 | in the output of | |
8fe914ec LP |
144 | <command>list-units</command> and |
145 | <command>list-jobs</command>.</para></listitem> | |
146 | </varlistentry> | |
147 | ||
7874bcd6 | 148 | <varlistentry> |
90d473a1 | 149 | <term><option>--fail</option></term> |
7874bcd6 LP |
150 | |
151 | <listitem><para>If the requested | |
ee5762e3 LP |
152 | operation conflicts with a pending |
153 | unfinished job, fail the command. If | |
154 | this is not specified the requested | |
155 | operation will replace the pending job, | |
30732560 LP |
156 | if necessary. Do not confuse |
157 | with | |
158 | <option>--failed</option>.</para></listitem> | |
ee5762e3 LP |
159 | </varlistentry> |
160 | ||
e67c3609 LP |
161 | <varlistentry> |
162 | <term><option>--ignore-dependencies</option></term> | |
163 | ||
164 | <listitem><para>When enqueuing a new | |
165 | job ignore all its dependencies and | |
166 | execute it immediately. If passed no | |
167 | required units of the unit passed will | |
168 | be pulled in, and no ordering | |
169 | dependencies will be honoured. This is | |
170 | mostly a debugging and rescue tool for | |
171 | the administrator and should not be | |
172 | used by | |
173 | applications.</para></listitem> | |
174 | </varlistentry> | |
175 | ||
ee5762e3 LP |
176 | <varlistentry> |
177 | <term><option>--quiet</option></term> | |
178 | <term><option>-q</option></term> | |
179 | ||
180 | <listitem><para>Suppress output to | |
181 | STDOUT in | |
182 | <command>snapshot</command>, | |
3d428115 | 183 | <command>is-active</command>, |
ee5762e3 LP |
184 | <command>enable</command> and |
185 | <command>disable</command>.</para></listitem> | |
186 | </varlistentry> | |
187 | ||
188 | <varlistentry> | |
189 | <term><option>--no-block</option></term> | |
190 | ||
a9c72fe9 LP |
191 | <listitem><para>Do not synchronously wait for |
192 | the requested operation to finish. If this is | |
193 | not specified the job will be verified, | |
194 | enqueued and <command>systemctl</command> will | |
195 | wait until it is completed. By passing this | |
196 | argument it is only verified and | |
a61933ad LP |
197 | enqueued.</para></listitem> |
198 | </varlistentry> | |
ee5762e3 | 199 | |
0736af98 | 200 | <varlistentry> |
ebed32bf MS |
201 | <term><option>--no-legend</option></term> |
202 | ||
203 | <listitem><para>Do not print a legend, i.e. | |
204 | the column headers and the footer with hints. | |
205 | </para></listitem> | |
206 | </varlistentry> | |
207 | ||
208 | <varlistentry> | |
0736af98 MV |
209 | <term><option>--no-pager</option></term> |
210 | ||
211 | <listitem><para>Do not pipe output into a | |
212 | pager.</para></listitem> | |
213 | </varlistentry> | |
214 | ||
ee5762e3 LP |
215 | <varlistentry> |
216 | <term><option>--system</option></term> | |
217 | ||
218 | <listitem><para>Talk to the systemd | |
219 | system manager. (Default)</para></listitem> | |
220 | </varlistentry> | |
221 | ||
222 | <varlistentry> | |
af2d49f7 | 223 | <term><option>--user</option></term> |
ee5762e3 LP |
224 | |
225 | <listitem><para>Talk to the systemd | |
af2d49f7 | 226 | manager of the calling user.</para></listitem> |
7874bcd6 LP |
227 | </varlistentry> |
228 | ||
4445a875 LP |
229 | <varlistentry> |
230 | <term><option>--order</option></term> | |
231 | <term><option>--require</option></term> | |
232 | ||
233 | <listitem><para>When used in | |
234 | conjunction with the | |
235 | <command>dot</command> command (see | |
236 | below), selects which dependencies are | |
237 | shown in the dependency graph. If | |
238 | <option>--order</option> is passed | |
239 | only dependencies of type | |
240 | <varname>After=</varname> or | |
241 | <varname>Before=</varname> are | |
242 | shown. If <option>--require</option> | |
243 | is passed only dependencies of type | |
244 | <varname>Requires=</varname>, | |
245 | <varname>RequiresOverridable=</varname>, | |
246 | <varname>Requisite=</varname>, | |
247 | <varname>RequisiteOverridable=</varname>, | |
248 | <varname>Wants=</varname> and | |
249 | <varname>Conflicts=</varname> are | |
250 | shown. If neither is passed, shows | |
251 | dependencies of all these | |
252 | types.</para></listitem> | |
253 | </varlistentry> | |
254 | ||
7874bcd6 | 255 | <varlistentry> |
ee5762e3 | 256 | <term><option>--no-wall</option></term> |
7874bcd6 | 257 | |
ee5762e3 LP |
258 | <listitem><para>Don't send wall |
259 | message before | |
260 | halt, power-off, reboot.</para></listitem> | |
7874bcd6 LP |
261 | </varlistentry> |
262 | ||
263 | <varlistentry> | |
ee5762e3 LP |
264 | <term><option>--global</option></term> |
265 | ||
266 | <listitem><para>When used with | |
267 | <command>enable</command> and | |
268 | <command>disable</command>, operate on the | |
3d428115 | 269 | global user configuration |
ee5762e3 LP |
270 | directory, thus enabling or disabling |
271 | a unit file globally for all future | |
af2d49f7 | 272 | logins of all users.</para></listitem> |
7874bcd6 LP |
273 | </varlistentry> |
274 | ||
275 | <varlistentry> | |
ee5762e3 LP |
276 | <term><option>--no-reload</option></term> |
277 | ||
278 | <listitem><para>When used with | |
279 | <command>enable</command> and | |
280 | <command>disable</command>, do not | |
281 | implicitly reload daemon configuration | |
282 | after executing the | |
283 | changes.</para></listitem> | |
284 | </varlistentry> | |
7594fb25 | 285 | |
501fc174 LP |
286 | <varlistentry> |
287 | <term><option>--no-ask-password</option></term> | |
288 | ||
289 | <listitem><para>When used with | |
290 | <command>start</command> and related | |
291 | commands, disables asking for | |
292 | passwords. Background services may | |
293 | require input of a password or | |
294 | passphrase string, for example to | |
295 | unlock system hard disks or | |
296 | cryptographic certificates. Unless | |
297 | this option is specified and the | |
298 | command is invoked from a terminal | |
299 | <command>systemctl</command> will | |
300 | query the user on the terminal for the | |
301 | necessary secrets. Use this option to | |
3d428115 | 302 | switch this behavior off. In this |
501fc174 LP |
303 | case the password must be supplied by |
304 | some other means (for example | |
305 | graphical password agents) or the | |
306 | service might fail.</para></listitem> | |
307 | </varlistentry> | |
308 | ||
8a0867d6 LP |
309 | <varlistentry> |
310 | <term><option>--kill-who=</option></term> | |
311 | ||
312 | <listitem><para>When used with | |
313 | <command>kill</command>, choose which | |
314 | processes to kill. Must be one of | |
315 | <option>main</option>, | |
316 | <option>control</option> or | |
317 | <option>all</option> to select whether | |
318 | to kill only the main process of the | |
319 | unit, the control process or all | |
3d428115 | 320 | processes of the unit. If omitted |
8a0867d6 LP |
321 | defaults to |
322 | <option>all</option>.</para></listitem> | |
323 | </varlistentry> | |
324 | ||
325 | <varlistentry> | |
3d428115 | 326 | <term><option>--signal=</option></term> |
8a0867d6 LP |
327 | <term><option>-s</option></term> |
328 | ||
329 | <listitem><para>When used with | |
330 | <command>kill</command>, choose which | |
331 | signal to send to selected | |
332 | processes. Must be one of the well | |
3d428115 | 333 | known signal specifiers such as |
8a0867d6 | 334 | SIGTERM, SIGINT or SIGSTOP. If |
3d428115 | 335 | omitted defaults to |
8a0867d6 LP |
336 | <option>SIGTERM</option>.</para></listitem> |
337 | </varlistentry> | |
338 | ||
7594fb25 | 339 | <varlistentry> |
ee5762e3 | 340 | <term><option>--force</option></term> |
6f352544 | 341 | <term><option>-f</option></term> |
7874bcd6 | 342 | |
ee5762e3 LP |
343 | <listitem><para>When used with |
344 | <command>enable</command>, override any | |
345 | existing conflicting | |
346 | symlinks.</para></listitem> | |
6f352544 LP |
347 | |
348 | <listitem><para>When used with | |
349 | <command>halt</command>, | |
350 | <command>poweroff</command>, | |
351 | <command>reboot</command> or | |
e606bb61 | 352 | <command>kexec</command> execute the |
6f352544 LP |
353 | selected operation without shutting |
354 | down all units. However, all processes | |
355 | will be killed forcibly and all file | |
356 | systems are unmounted or remounted | |
357 | read-only. This is hence a drastic but | |
358 | relatively safe option to request an | |
e606bb61 LP |
359 | immediate reboot. If |
360 | <option>--force</option> is specified | |
361 | twice for these operations, they will | |
362 | be executed immediately without | |
363 | terminating any processes or umounting | |
364 | any file systems. Warning: specifying | |
365 | <option>--force</option> twice with | |
366 | any of these operations might result | |
367 | in data loss.</para></listitem> | |
7874bcd6 LP |
368 | </varlistentry> |
369 | ||
370 | <varlistentry> | |
729e3769 | 371 | <term><option>--root=</option></term> |
ee5762e3 LP |
372 | |
373 | <listitem><para>When used with | |
729e3769 LP |
374 | <command>enable</command>/<command>disable</command>/<command>is-enabled</command> (and |
375 | related commands), use alternative | |
376 | root path when looking for unit | |
377 | files.</para></listitem> | |
7874bcd6 | 378 | </varlistentry> |
a8f11321 | 379 | |
be394c48 | 380 | <varlistentry> |
729e3769 | 381 | <term><option>--runtime</option></term> |
be394c48 FC |
382 | |
383 | <listitem><para>When used with | |
729e3769 LP |
384 | <command>enable</command>/<command>disable</command>/<command>is-enabled</command> (and related commands), make |
385 | changes only temporarily, so that they | |
386 | are dropped on the next reboot. This | |
387 | will have the effect that changes are | |
388 | not made in subdirectories of | |
389 | <filename>/etc</filename> but in | |
390 | <filename>/run</filename>, with | |
391 | identical immediate effects, however, | |
392 | since the latter is lost on reboot, | |
393 | the changes are lost | |
394 | too.</para></listitem> | |
be394c48 FC |
395 | </varlistentry> |
396 | ||
a8f11321 LP |
397 | <varlistentry> |
398 | <term><option>-H</option></term> | |
399 | <term><option>--host</option></term> | |
400 | ||
401 | <listitem><para>Execute operation | |
9f7dad77 VS |
402 | remotely. Specify a hostname, or |
403 | username and hostname separated by @, | |
a8f11321 LP |
404 | to connect to. This will use SSH to |
405 | talk to the remote systemd | |
406 | instance.</para></listitem> | |
407 | </varlistentry> | |
408 | ||
409 | <varlistentry> | |
410 | <term><option>-P</option></term> | |
411 | <term><option>--privileged</option></term> | |
412 | ||
413 | <listitem><para>Acquire privileges via | |
414 | PolicyKit before executing the | |
415 | operation.</para></listitem> | |
416 | </varlistentry> | |
5c3246b1 LP |
417 | |
418 | <varlistentry> | |
419 | <term><option>--lines=</option></term> | |
420 | <term><option>-n</option></term> | |
421 | ||
422 | <listitem><para>When used with | |
423 | <command>status</command> controls the | |
424 | number of journal lines to show, | |
425 | counting from the most recent | |
426 | ones. Takes a positive integer | |
427 | argument. Defaults to | |
428 | 10.</para></listitem> | |
429 | </varlistentry> | |
430 | ||
431 | <varlistentry> | |
432 | <term><option>--follow</option></term> | |
5c3246b1 LP |
433 | |
434 | <listitem><para>When used with | |
435 | <command>status</command> continously | |
436 | prints new journal entries as they are | |
437 | appended to the | |
438 | journal.</para></listitem> | |
439 | </varlistentry> | |
440 | ||
441 | <varlistentry> | |
442 | <term><option>--output=</option></term> | |
443 | <term><option>-o</option></term> | |
444 | ||
445 | <listitem><para>When used with | |
446 | <command>status</command> controls the | |
447 | formatting of the journal entries that | |
448 | are shown. For the available choices | |
449 | see | |
169c4f65 | 450 | <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>. Defaults |
5c3246b1 LP |
451 | to |
452 | <literal>short</literal>.</para></listitem> | |
453 | </varlistentry> | |
454 | ||
7874bcd6 LP |
455 | </variablelist> |
456 | ||
457 | <para>The following commands are understood:</para> | |
458 | ||
459 | <variablelist> | |
460 | <varlistentry> | |
461 | <term><command>list-units</command></term> | |
462 | ||
463 | <listitem><para>List known units.</para></listitem> | |
464 | </varlistentry> | |
7874bcd6 LP |
465 | <varlistentry> |
466 | <term><command>start [NAME...]</command></term> | |
467 | ||
ee5762e3 LP |
468 | <listitem><para>Start (activate) one |
469 | or more units specified on the command | |
7874bcd6 LP |
470 | line.</para></listitem> |
471 | </varlistentry> | |
472 | <varlistentry> | |
473 | <term><command>stop [NAME...]</command></term> | |
474 | ||
ee5762e3 LP |
475 | <listitem><para>Stop (deactivate) one |
476 | or more units specified on the command | |
7874bcd6 LP |
477 | line.</para></listitem> |
478 | </varlistentry> | |
7874bcd6 LP |
479 | <varlistentry> |
480 | <term><command>reload [NAME...]</command></term> | |
481 | ||
ee5762e3 LP |
482 | <listitem><para>Asks all units listed |
483 | on the command line to reload their | |
7874bcd6 | 484 | configuration. Note that this will |
ee5762e3 LP |
485 | reload the service-specific |
486 | configuration, not the unit | |
487 | configuration file of systemd. If you | |
488 | want systemd to reload the | |
489 | configuration file of a unit use the | |
7874bcd6 LP |
490 | <command>daemon-reload</command> |
491 | command. In other words: for the | |
492 | example case of Apache, this will | |
493 | reload Apache's | |
494 | <filename>httpd.conf</filename> in the | |
495 | web server, not the | |
496 | <filename>apache.service</filename> | |
ee5762e3 LP |
497 | systemd unit file. </para> |
498 | ||
499 | <para>This command should not be | |
500 | confused with the | |
501 | <command>daemon-reload</command> or | |
502 | <command>load</command> | |
7874bcd6 LP |
503 | commands.</para></listitem> |
504 | ||
505 | </varlistentry> | |
506 | <varlistentry> | |
6f28c033 LP |
507 | <term><command>restart [NAME...]</command></term> |
508 | ||
509 | <listitem><para>Restart one or more | |
510 | units specified on the command | |
511 | line. If the units are not running yet | |
512 | they will be | |
513 | started.</para></listitem> | |
514 | </varlistentry> | |
515 | <varlistentry> | |
516 | <term><command>try-restart [NAME...]</command></term> | |
517 | ||
518 | <listitem><para>Restart one or more | |
519 | units specified on the command | |
f1f8cfd0 AB |
520 | line if the units are running. Do |
521 | nothing if units are not running. | |
522 | Note that for compatibility | |
9bee76ee RB |
523 | with Red Hat init scripts |
524 | <command>condrestart</command> is | |
525 | equivalent to this command.</para></listitem> | |
6f28c033 LP |
526 | </varlistentry> |
527 | <varlistentry> | |
528 | <term><command>reload-or-restart [NAME...]</command></term> | |
9bee76ee RB |
529 | |
530 | <listitem><para>Reload one or more | |
531 | units if they support it. If not, | |
532 | restart them instead. If the units | |
533 | are not running yet they will be | |
534 | started.</para></listitem> | |
535 | </varlistentry> | |
536 | <varlistentry> | |
6f28c033 LP |
537 | <term><command>reload-or-try-restart [NAME...]</command></term> |
538 | ||
539 | <listitem><para>Reload one or more | |
ee5762e3 | 540 | units if they support it. If not, |
100fd567 LP |
541 | restart them instead. Do nothing if |
542 | the units are not running. Note that | |
543 | for compatibility with SysV init | |
544 | scripts | |
9bee76ee | 545 | <command>force-reload</command> is |
100fd567 LP |
546 | equivalent to this |
547 | command.</para></listitem> | |
6f28c033 LP |
548 | </varlistentry> |
549 | <varlistentry> | |
7874bcd6 LP |
550 | <term><command>isolate [NAME]</command></term> |
551 | ||
552 | <listitem><para>Start the unit | |
553 | specified on the command line and its | |
25f63d46 MM |
554 | dependencies and stop all others.</para> |
555 | ||
556 | <para>This is similar to changing the | |
557 | runlevel in a traditional init system. The | |
558 | <command>isolate</command> command will | |
559 | immediately stop processes that are not | |
560 | enabled in the new unit, possibly including | |
561 | the graphical environment or terminal you | |
562 | are currently using.</para> | |
563 | ||
564 | <para>Note that this works only on units | |
565 | where <option>AllowIsolate=</option> is | |
2528a7a6 LP |
566 | enabled. See |
567 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
568 | for details.</para></listitem> | |
7874bcd6 | 569 | </varlistentry> |
8a0867d6 LP |
570 | <varlistentry> |
571 | <term><command>kill [NAME...]</command></term> | |
572 | ||
573 | <listitem><para>Send a signal to one | |
574 | or more processes of the unit. Use | |
575 | <option>--kill-who=</option> to select | |
576 | which process to kill. Use | |
577 | <option>--kill-mode=</option> to | |
578 | select the kill mode and | |
579 | <option>--signal=</option> to select | |
580 | the signal to send.</para></listitem> | |
581 | </varlistentry> | |
7594fb25 | 582 | <varlistentry> |
ee5762e3 | 583 | <term><command>is-active [NAME...]</command></term> |
7594fb25 LP |
584 | |
585 | <listitem><para>Check whether any of | |
3d428115 | 586 | the specified units are active |
ee5762e3 LP |
587 | (i.e. running). Returns an exit code |
588 | 0 if at least one is active, non-zero | |
7594fb25 LP |
589 | otherwise. Unless |
590 | <option>--quiet</option> is specified | |
591 | this will also print the current unit | |
592 | state to STDOUT.</para></listitem> | |
593 | </varlistentry> | |
61cbdc4b | 594 | <varlistentry> |
75676b72 | 595 | <term><command>status [NAME...|PID...]</command></term> |
61cbdc4b | 596 | |
ee5762e3 LP |
597 | <listitem><para>Show terse runtime |
598 | status information about one or more | |
5c3246b1 LP |
599 | units, followed by its most recent log |
600 | data from the journal. This function | |
601 | is intended to generate human-readable | |
602 | output. If you are looking for | |
603 | computer-parsable output, use | |
604 | <command>show</command> instead. If a | |
605 | PID is passed information about the | |
606 | unit the process of the PID belongs to | |
607 | is shown.</para></listitem> | |
61cbdc4b | 608 | </varlistentry> |
393a2f9b LP |
609 | <varlistentry> |
610 | <term><command>show [NAME...|JOB...]</command></term> | |
611 | ||
ee5762e3 LP |
612 | <listitem><para>Show properties of one |
613 | or more units, jobs or the manager | |
393a2f9b | 614 | itself. If no argument is specified |
61cbdc4b | 615 | properties of the manager will be |
393a2f9b | 616 | shown. If a unit name is specified |
ee5762e3 LP |
617 | properties of the unit is shown, and |
618 | if a job id is specified properties of | |
619 | the job is shown. By default, empty | |
620 | properties are suppressed. Use | |
621 | <option>--all</option> to show those | |
622 | too. To select specific properties to | |
623 | show use | |
624 | <option>--property=</option>. This | |
625 | command is intended to be used | |
626 | whenever computer-parsable output is | |
627 | required. Use | |
628 | <command>status</command> if you are | |
629 | looking for formatted human-readable | |
630 | output.</para></listitem> | |
393a2f9b | 631 | </varlistentry> |
5632e374 LP |
632 | |
633 | <varlistentry> | |
74ac3cbd MM |
634 | <term><command>reset-failed [NAME...]</command></term> |
635 | ||
636 | <listitem><para>Reset the | |
637 | '<literal>failed</literal>' state of the | |
638 | specified units, or if no unit name is | |
639 | passed of all units. When a unit fails | |
640 | in some way (i.e. process exiting with | |
641 | non-zero error code, terminating | |
642 | abnormally or timing out) it will | |
643 | automatically enter the | |
644 | '<literal>failed</literal>' state and | |
645 | its exit code and status is recorded | |
646 | for introspection by the administrator | |
5632e374 LP |
647 | until the service is restarted or |
648 | reset with this | |
649 | command.</para></listitem> | |
650 | </varlistentry> | |
651 | ||
7e13bea0 RB |
652 | <varlistentry> |
653 | <term><command>list-unit-files</command></term> | |
654 | ||
655 | <listitem><para>List installed unit files. | |
656 | </para></listitem> | |
657 | </varlistentry> | |
658 | ||
ee5762e3 LP |
659 | <varlistentry> |
660 | <term><command>enable [NAME...]</command></term> | |
661 | ||
662 | <listitem><para>Enable one or more | |
663 | unit files, as specified on the | |
664 | command line. This will create a | |
665 | number of symlinks as encoded in the | |
666 | <literal>[Install]</literal> sections | |
667 | of the unit files. After the symlinks | |
668 | have been created the systemd | |
669 | configuration is reloaded (in a way | |
670 | that is equivalent to | |
671 | <command>daemon-reload</command>) to | |
672 | ensure the changes are taken into | |
673 | account immediately. Note that this | |
674 | does not have the effect that any of | |
675 | the units enabled are also started at | |
676 | the same time. If this is desired a | |
96d4ce01 | 677 | separate <command>start</command> |
ee5762e3 LP |
678 | command must be invoked for the |
679 | unit.</para> | |
680 | ||
681 | <para>This command will | |
682 | print the actions executed. This | |
683 | output may be suppressed by passing | |
684 | <option>--quiet</option>.</para> | |
685 | ||
686 | <para>Note that this operation creates | |
687 | only the suggested symlinks for the | |
688 | units. While this command is the | |
689 | recommended way to manipulate the unit | |
690 | configuration directory, the | |
691 | administrator is free to make | |
692 | additional changes manually, by | |
693 | placing or removing symlinks in the | |
3d428115 | 694 | directory. This is particularly useful |
ee5762e3 LP |
695 | to create configurations that deviate |
696 | from the suggested default | |
697 | installation. In this case the | |
698 | administrator must make sure to invoke | |
699 | <command>daemon-reload</command> | |
700 | manually as necessary, to ensure his | |
701 | changes are taken into account.</para> | |
702 | ||
703 | <para>Enabling units should not be | |
704 | confused with starting (activating) | |
705 | units, as done by the | |
706 | <command>start</command> | |
707 | command. Enabling and starting units | |
708 | is orthogonal: units may be enabled | |
709 | without being started and started | |
710 | without being enabled. Enabling simply | |
711 | hooks the unit into various suggested | |
712 | places (for example, so that the unit | |
713 | is automatically started on boot or | |
714 | when a particular kind of hardware is | |
715 | plugged in). Starting actually spawns | |
716 | the daemon process (in case of service | |
717 | units), or binds the socket (in case | |
718 | of socket units), and so | |
719 | on.</para> | |
720 | ||
721 | <para>Depending on whether | |
722 | <option>--system</option>, | |
af2d49f7 | 723 | <option>--user</option> or |
ee5762e3 LP |
724 | <option>--global</option> is specified |
725 | this enables the unit for the system, | |
af2d49f7 LP |
726 | for the calling user only |
727 | or for all future logins of all | |
ee5762e3 LP |
728 | users. Note that in the latter case no |
729 | systemd daemon configuration is | |
730 | reloaded.</para> | |
731 | </listitem> | |
732 | </varlistentry> | |
733 | ||
734 | <varlistentry> | |
735 | <term><command>disable [NAME...]</command></term> | |
736 | ||
737 | <listitem><para>Disables one or more | |
738 | units. This removes all symlinks to | |
739 | the specified unit files from the unit | |
740 | configuration directory, and hence | |
741 | undoes the changes made by | |
742 | <command>enable</command>. Note | |
729e3769 | 743 | however that this removes |
ee5762e3 LP |
744 | all symlinks to the unit files |
745 | (i.e. including manual additions), not | |
746 | just those actually created by | |
729e3769 | 747 | <command>enable</command>. This call |
ee5762e3 LP |
748 | implicitly reloads the systemd daemon |
749 | configuration after completing the | |
750 | disabling of the units. Note that this | |
751 | command does not implicitly stop the | |
752 | units that is being disabled. If this | |
753 | is desired an additional | |
754 | <command>stop</command>command should | |
755 | be executed afterwards.</para> | |
756 | ||
757 | <para>This command will print the | |
758 | actions executed. This output may be | |
759 | suppressed by passing | |
760 | <option>--quiet</option>.</para> | |
761 | </listitem> | |
762 | ||
3d428115 | 763 | <para>This command honors |
ee5762e3 | 764 | <option>--system</option>, |
af2d49f7 | 765 | <option>--user</option>, |
ee5762e3 LP |
766 | <option>--global</option> in a similar |
767 | way as | |
768 | <command>enable</command>.</para> | |
769 | </varlistentry> | |
770 | ||
771 | <varlistentry> | |
772 | <term><command>is-enabled [NAME...]</command></term> | |
773 | ||
774 | <listitem><para>Checks whether any of | |
775 | the specified unit files is enabled | |
776 | (as with | |
777 | <command>enable</command>). Returns an | |
778 | exit code of 0 if at least one is | |
729e3769 LP |
779 | enabled, non-zero otherwise. Prints |
780 | the current enable status. To suppress | |
781 | this output use | |
782 | <option>--quiet</option>.</para></listitem> | |
783 | </varlistentry> | |
784 | ||
785 | <varlistentry> | |
786 | <term><command>reenable [NAME...]</command></term> | |
787 | ||
788 | <listitem><para>Reenable one or more | |
789 | unit files, as specified on the | |
790 | command line. This is a combination of | |
791 | <command>disable</command> and | |
792 | <command>enable</command> and is | |
793 | useful to reset the symlinks a unit is | |
794 | enabled with to the defaults | |
795 | configured in the | |
796 | <literal>[Install]</literal> section | |
797 | of the unit file.</para> | |
798 | </listitem> | |
799 | </varlistentry> | |
800 | ||
801 | <varlistentry> | |
802 | <term><command>preset [NAME...]</command></term> | |
803 | ||
804 | <listitem><para>Reset one or more unit | |
805 | files, as specified on the command | |
806 | line, to the defaults configured in a | |
807 | preset file. This has the same effect | |
808 | as <command>disable</command> or | |
809 | <command>enable</command>, depending | |
810 | how the unit is listed in the preset | |
811 | files.</para> | |
812 | </listitem> | |
813 | </varlistentry> | |
814 | ||
815 | <varlistentry> | |
816 | <term><command>mask [NAME...]</command></term> | |
817 | ||
818 | <listitem><para>Mask one or more unit | |
819 | files, as specified on the command | |
820 | line. This will link these units to | |
821 | <filename>/dev/null</filename>, making | |
822 | it impossible to start them. This is a stronger version | |
823 | of <command>disable</command>, since | |
824 | it prohibits all kinds of activation | |
825 | of the unit, including manual | |
826 | activation. Use this option with | |
827 | care.</para> | |
828 | </listitem> | |
829 | </varlistentry> | |
830 | ||
831 | <varlistentry> | |
832 | <term><command>unmask [NAME...]</command></term> | |
833 | ||
834 | <listitem><para>Unmask one or more | |
835 | unit files, as specified on the | |
836 | command line. This will undo the | |
837 | effect of | |
838 | <command>mask</command>.</para> | |
839 | </listitem> | |
840 | </varlistentry> | |
841 | ||
842 | <varlistentry> | |
843 | <term><command>link [NAME...]</command></term> | |
844 | ||
845 | <listitem><para>Link a unit file that | |
846 | is not in the unit file search paths | |
847 | into the unit file search path. This | |
848 | requires an absolute path to a unit | |
849 | file. The effect of this can be undone | |
850 | with <command>disable</command>. The | |
851 | effect of this command is that a unit | |
852 | file is available for | |
853 | <command>start</command> and other | |
854 | commands although it isn't installed | |
855 | directly in the unit search | |
856 | path.</para> | |
857 | </listitem> | |
ee5762e3 LP |
858 | </varlistentry> |
859 | ||
393a2f9b LP |
860 | <varlistentry> |
861 | <term><command>load [NAME...]</command></term> | |
862 | ||
863 | <listitem><para>Load one or more units | |
864 | specified on the command line. This | |
865 | will simply load their configuration | |
866 | from disk, but not start them. To | |
867 | start them you need to use the | |
868 | <command>start</command> command which | |
869 | will implicitly load a unit that has | |
870 | not been loaded yet. Note that systemd | |
871 | garbage collects loaded units that are | |
872 | not active or referenced by an active | |
873 | unit. This means that units loaded | |
874 | this way will usually not stay loaded | |
875 | for long. Also note that this command | |
876 | cannot be used to reload unit | |
877 | configuration. Use the | |
878 | <command>daemon-reload</command> | |
879 | command for that. All in all, this | |
880 | command is of little use except for | |
881 | debugging.</para> | |
882 | <para>This command should not be | |
883 | confused with the | |
884 | <command>daemon-reload</command> or | |
885 | <command>reload</command> | |
886 | commands.</para></listitem> | |
887 | </varlistentry> | |
888 | <varlistentry> | |
889 | <term><command>list-jobs</command></term> | |
890 | ||
891 | <listitem><para>List jobs that are in progress.</para></listitem> | |
892 | </varlistentry> | |
893 | <varlistentry> | |
894 | <term><command>cancel [JOB...]</command></term> | |
895 | ||
896 | <listitem><para>Cancel one or more | |
897 | jobs specified on the command line by | |
898 | their numeric job | |
3d428115 | 899 | IDs. If no job id is specified, cancel all pending jobs.</para></listitem> |
393a2f9b | 900 | </varlistentry> |
7874bcd6 LP |
901 | <varlistentry> |
902 | <term><command>dump</command></term> | |
903 | ||
904 | <listitem><para>Dump server | |
905 | status. This will output a (usually | |
906 | very long) human readable manager | |
907 | status dump. Its format is subject to | |
908 | change without notice and should not | |
909 | be parsed by | |
910 | applications.</para></listitem> | |
911 | </varlistentry> | |
4445a875 LP |
912 | <varlistentry> |
913 | <term><command>dot</command></term> | |
914 | ||
915 | <listitem><para>Generate textual | |
916 | dependency graph description in dot | |
917 | format for further processing with the | |
918 | GraphViz | |
919 | <citerefentry><refentrytitle>dot</refentrytitle><manvolnum>1</manvolnum></citerefentry> | |
920 | tool. Use a command line like | |
921 | <command>systemctl dot | dot -Tsvg > | |
922 | systemd.svg</command> to generate a | |
923 | graphical dependency tree. Unless | |
924 | <option>--order</option> or | |
925 | <option>--require</option> is passed | |
926 | the generated graph will show both | |
927 | ordering and requirement | |
928 | dependencies.</para></listitem> | |
929 | </varlistentry> | |
7874bcd6 LP |
930 | <varlistentry> |
931 | <term><command>snapshot [NAME]</command></term> | |
932 | ||
933 | <listitem><para>Create a snapshot. If | |
af62c704 | 934 | a snapshot name is specified, the new |
7874bcd6 LP |
935 | snapshot will be named after it. If |
936 | none is specified an automatic | |
937 | snapshot name is generated. In either | |
7594fb25 LP |
938 | case, the snapshot name used is |
939 | printed to STDOUT, unless | |
940 | <option>--quiet</option> is | |
941 | specified.</para> | |
7874bcd6 LP |
942 | |
943 | <para>A snapshot refers to a saved | |
944 | state of the systemd manager. It is | |
3d428115 | 945 | implemented itself as a unit that is |
7874bcd6 LP |
946 | generated dynamically with this |
947 | command and has dependencies on all | |
948 | units active at the time. At a later | |
949 | time the user may return to this state | |
950 | by using the | |
951 | <command>isolate</command> command on | |
952 | the snapshot unit.</para></listitem> | |
953 | ||
954 | <para>Snapshots are only useful for | |
955 | saving and restoring which units are | |
956 | running or are stopped, they do not | |
957 | save/restore any other | |
958 | state. Snapshots are dynamic and lost | |
959 | on reboot.</para> | |
960 | </varlistentry> | |
961 | <varlistentry> | |
6759e7a7 LP |
962 | <term><command>delete [NAME...]</command></term> |
963 | ||
964 | <listitem><para>Remove a snapshot | |
965 | previously created with | |
966 | <command>snapshot</command>.</para></listitem> | |
967 | </varlistentry> | |
968 | <varlistentry> | |
7874bcd6 LP |
969 | <term><command>daemon-reload</command></term> |
970 | ||
971 | <listitem><para>Reload systemd manager | |
972 | configuration. This will reload all | |
973 | unit files and recreate the entire | |
974 | dependency tree. While the daemon is | |
af62c704 | 975 | reloaded, all sockets systemd listens |
ad678a06 | 976 | on on behalf of user configuration will |
7874bcd6 LP |
977 | stay accessible.</para> <para>This |
978 | command should not be confused with | |
979 | the <command>load</command> or | |
980 | <command>reload</command> | |
981 | commands.</para></listitem> | |
982 | </varlistentry> | |
983 | <varlistentry> | |
984 | <term><command>daemon-reexec</command></term> | |
985 | ||
986 | <listitem><para>Reexecute the systemd | |
987 | manager. This will serialize the | |
988 | manager state, reexecute the process | |
989 | and deserialize the state again. This | |
990 | command is of little use except for | |
991 | debugging and package | |
992 | upgrades. Sometimes it might be | |
993 | helpful as a heavy-weight | |
994 | <command>daemon-reload</command>. While | |
995 | the daemon is reexecuted all sockets | |
996 | systemd listens on on behalf of user | |
997 | configuration will stay | |
998 | accessible.</para></listitem> | |
999 | </varlistentry> | |
7874bcd6 LP |
1000 | <varlistentry> |
1001 | <term><command>show-environment</command></term> | |
1002 | ||
1003 | <listitem><para>Dump the systemd | |
1004 | manager environment block. The | |
1005 | environment block will be dumped in | |
1006 | straight-forward form suitable for | |
1007 | sourcing into a shell script. This | |
1008 | environment block will be passed to | |
1009 | all processes the manager | |
1010 | spawns.</para></listitem> | |
1011 | </varlistentry> | |
1012 | <varlistentry> | |
1013 | <term><command>set-environment [NAME=VALUE...]</command></term> | |
1014 | ||
1015 | <listitem><para>Set one or more | |
1016 | systemd manager environment variables, | |
1017 | as specified on the command | |
1018 | line.</para></listitem> | |
1019 | </varlistentry> | |
1020 | <varlistentry> | |
1021 | <term><command>unset-environment [NAME...]</command></term> | |
1022 | ||
1023 | <listitem><para>Unset one or more | |
1024 | systemd manager environment | |
1025 | variables. If only a variable name is | |
1026 | specified it will be removed | |
1027 | regardless of its value. If a variable | |
1028 | and a value are specified the variable | |
1029 | is only removed if it has the | |
1030 | specified value.</para></listitem> | |
1031 | </varlistentry> | |
59cddb23 LP |
1032 | <varlistentry> |
1033 | <term><command>default</command></term> | |
1034 | ||
1035 | <listitem><para>Enter default | |
1036 | mode. This is mostly equivalent to | |
1037 | <command>start | |
1038 | default.target</command>.</para></listitem> | |
1039 | </varlistentry> | |
1040 | <varlistentry> | |
1041 | <term><command>rescue</command></term> | |
1042 | ||
1043 | <listitem><para>Enter rescue | |
1044 | mode. This is mostly equivalent to | |
1045 | <command>isolate | |
1046 | rescue.target</command> but also | |
1047 | prints a wall message to all | |
1048 | users.</para></listitem> | |
1049 | </varlistentry> | |
1050 | <varlistentry> | |
1051 | <term><command>emergency</command></term> | |
7874bcd6 | 1052 | |
59cddb23 LP |
1053 | <listitem><para>Enter emergency |
1054 | mode. This is mostly equivalent to | |
1055 | <command>isolate | |
1056 | emergency.target</command> but also | |
1057 | prints a wall message to all | |
1058 | users.</para></listitem> | |
1059 | </varlistentry> | |
7874bcd6 LP |
1060 | <varlistentry> |
1061 | <term><command>halt</command></term> | |
1062 | ||
1063 | <listitem><para>Shut down and halt the | |
1064 | system. This is mostly equivalent to | |
1065 | <command>start halt.target</command> | |
1066 | but also prints a wall message to all | |
e606bb61 LP |
1067 | users. If combined with |
1068 | <option>--force</option> shutdown of | |
1069 | all running services is skipped, | |
1070 | however all processes are killed and | |
1071 | all file systems are unmounted or | |
59cddb23 | 1072 | mounted read-only, immediately |
e606bb61 LP |
1073 | followed by the system halt. If |
1074 | <option>--force</option> is specified | |
1075 | twice the the operation is immediately | |
1076 | executed without terminating any | |
1077 | processes or unmounting any file | |
1078 | systems. This may result in data | |
1079 | loss.</para></listitem> | |
7874bcd6 LP |
1080 | </varlistentry> |
1081 | <varlistentry> | |
1082 | <term><command>poweroff</command></term> | |
1083 | ||
1084 | <listitem><para>Shut down and | |
1085 | power-off the system. This is mostly | |
1086 | equivalent to <command>start | |
1087 | poweroff.target</command> but also | |
e606bb61 | 1088 | prints a wall message to all users. If |
59cddb23 LP |
1089 | combined with <option>--force</option> |
1090 | shutdown of all running services is | |
e606bb61 LP |
1091 | skipped, however all processes are |
1092 | killed and all file systems are | |
1093 | unmounted or mounted read-only, | |
1094 | immediately followed by the powering | |
1095 | off. If <option>--force</option> is | |
1096 | specified twice the the operation is | |
1097 | immediately executed without | |
1098 | terminating any processes or | |
1099 | unmounting any file systems. This may | |
1100 | result in data loss.</para></listitem> | |
7874bcd6 LP |
1101 | </varlistentry> |
1102 | <varlistentry> | |
1103 | <term><command>reboot</command></term> | |
1104 | ||
e606bb61 LP |
1105 | <listitem><para>Shut down and reboot |
1106 | the system. This is mostly equivalent | |
1107 | to <command>start | |
7874bcd6 | 1108 | reboot.target</command> but also |
e606bb61 | 1109 | prints a wall message to all users. If |
59cddb23 LP |
1110 | combined with <option>--force</option> |
1111 | shutdown of all running services is | |
e606bb61 LP |
1112 | skipped, however all processes are |
1113 | killed and all file systems are | |
1114 | unmounted or mounted read-only, | |
1115 | immediately followed by the reboot. If | |
1116 | <option>--force</option> is specified | |
1117 | twice the the operation is immediately | |
1118 | executed without terminating any | |
1119 | processes or unmounting any file | |
1120 | systems. This may result in data | |
1121 | loss.</para></listitem> | |
7874bcd6 LP |
1122 | </varlistentry> |
1123 | <varlistentry> | |
59cddb23 | 1124 | <term><command>kexec</command></term> |
7874bcd6 | 1125 | |
59cddb23 LP |
1126 | <listitem><para>Shut down and reboot |
1127 | the system via kexec. This is mostly | |
1128 | equivalent to <command>start | |
1129 | kexec.target</command> but also prints | |
1130 | a wall message to all users. If | |
1131 | combined with <option>--force</option> | |
1132 | shutdown of all running services is | |
3d428115 RB |
1133 | skipped, however all processes are killed |
1134 | and all file systems are unmounted or | |
59cddb23 LP |
1135 | mounted read-only, immediately |
1136 | followed by the | |
1137 | reboot.</para></listitem> | |
7874bcd6 LP |
1138 | </varlistentry> |
1139 | <varlistentry> | |
59cddb23 | 1140 | <term><command>exit</command></term> |
7874bcd6 | 1141 | |
59cddb23 LP |
1142 | <listitem><para>Ask the systemd |
1143 | manager to quit. This is only | |
af2d49f7 | 1144 | supported for user service managers |
59cddb23 | 1145 | (i.e. in conjunction with the |
af2d49f7 | 1146 | <option>--user</option> option) and |
59cddb23 | 1147 | will fail otherwise.</para></listitem> |
7874bcd6 LP |
1148 | </varlistentry> |
1149 | </variablelist> | |
1150 | ||
1151 | </refsect1> | |
1152 | ||
1153 | <refsect1> | |
1154 | <title>Exit status</title> | |
1155 | ||
1156 | <para>On success 0 is returned, a non-zero failure | |
1157 | code otherwise.</para> | |
1158 | </refsect1> | |
1159 | ||
abebb5af VS |
1160 | <refsect1> |
1161 | <title>Environment</title> | |
1162 | ||
1163 | <variablelist> | |
1164 | <varlistentry> | |
1165 | <term><varname>$SYSTEMD_PAGER</varname></term> | |
1166 | <listitem><para>Pager to use when | |
1167 | <option>--no-pager</option> is not given; | |
1168 | overrides <varname>$PAGER</varname>. Setting | |
1169 | this to an empty string or the value | |
1170 | <literal>cat</literal> is equivalent to passing | |
1171 | <option>--no-pager</option>.</para></listitem> | |
1172 | </varlistentry> | |
1173 | </variablelist> | |
1174 | </refsect1> | |
1175 | ||
7874bcd6 LP |
1176 | <refsect1> |
1177 | <title>See Also</title> | |
1178 | <para> | |
1179 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
1180 | <citerefentry><refentrytitle>systemadm</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
169c4f65 LP |
1181 | <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, |
1182 | <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
7874bcd6 LP |
1183 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>, |
1184 | <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>, | |
1185 | <citerefentry><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry> | |
1186 | </para> | |
1187 | </refsect1> | |
1188 | ||
1189 | </refentry> |