1SYSTEMCTL(1) systemctl SYSTEMCTL(1)
2
3
4
6 systemctl - Control the systemd system and service manager
7
9 systemctl [OPTIONS...] COMMAND [UNIT...]
10
12 systemctl may be used to introspect and control the state of the
13 "systemd" system and service manager. Please refer to systemd(1) for an
14 introduction into the basic concepts and functionality this tool
15 manages.
16
18 The following options are understood:
19
20 -t, --type=
21 The argument should be a comma-separated list of unit types such as
22 service and socket.
23
24 If one of the arguments is a unit type, when listing units, limit
25 display to certain unit types. Otherwise, units of all types will
26 be shown.
27
28 As a special case, if one of the arguments is help, a list of
29 allowed values will be printed and the program will exit.
30
31 --state=
32 The argument should be a comma-separated list of unit LOAD, SUB, or
33 ACTIVE states. When listing units, show only those in the specified
34 states. Use --state=failed to show only failed units.
35
36 As a special case, if one of the arguments is help, a list of
37 allowed values will be printed and the program will exit.
38
39 -p, --property=
40 When showing unit/job/manager properties with the show command,
41 limit display to properties specified in the argument. The argument
42 should be a comma-separated list of property names, such as
43 "MainPID". Unless specified, all known properties are shown. If
44 specified more than once, all properties with the specified names
45 are shown. Shell completion is implemented for property names.
46
47 For the manager itself, systemctl show will show all available
48 properties. Those properties are documented in systemd-
49 system.conf(5).
50
51 Properties for units vary by unit type, so showing any unit (even a
52 non-existent one) is a way to list properties pertaining to this
53 type. Similarly, showing any job will list properties pertaining to
54 all jobs. Properties for units are documented in systemd.unit(5),
55 and the pages for individual unit types systemd.service(5),
56 systemd.socket(5), etc.
57
58 -a, --all
59 When listing units with list-units, also show inactive units and
60 units which are following other units. When showing
61 unit/job/manager properties, show all properties regardless whether
62 they are set or not.
63
64 To list all units installed in the file system, use the
65 list-unit-files command instead.
66
67 When listing units with list-dependencies, recursively show
68 dependencies of all dependent units (by default only dependencies
69 of target units are shown).
70
71 -r, --recursive
72 When listing units, also show units of local containers. Units of
73 local containers will be prefixed with the container name,
74 separated by a single colon character (":").
75
76 --reverse
77 Show reverse dependencies between units with list-dependencies,
78 i.e. follow dependencies of type WantedBy=, RequiredBy=, PartOf=,
79 BoundBy=, instead of Wants= and similar.
80
81 --after
82 With list-dependencies, show the units that are ordered before the
83 specified unit. In other words, recursively list units following
84 the After= dependency.
85
86 Note that any After= dependency is automatically mirrored to create
87 a Before= dependency. Temporal dependencies may be specified
88 explicitly, but are also created implicitly for units which are
89 WantedBy= targets (see systemd.target(5)), and as a result of other
90 directives (for example RequiresMountsFor=). Both explicitly and
91 implicitly introduced dependencies are shown with
92 list-dependencies.
93
94 When passed to the list-jobs command, for each printed job show
95 which other jobs are waiting for it. May be combined with --before
96 to show both the jobs waiting for each job as well as all jobs each
97 job is waiting for.
98
99 --before
100 With list-dependencies, show the units that are ordered after the
101 specified unit. In other words, recursively list units following
102 the Before= dependency.
103
104 When passed to the list-jobs command, for each printed job show
105 which other jobs it is waiting for. May be combined with --after to
106 show both the jobs waiting for each job as well as all jobs each
107 job is waiting for.
108
109 -l, --full
110 Do not ellipsize unit names, process tree entries, journal output,
111 or truncate unit descriptions in the output of status, list-units,
112 list-jobs, and list-timers.
113
114 Also, show installation targets in the output of is-enabled.
115
116 --value
117 When printing properties with show, only print the value, and skip
118 the property name and "=".
119
120 --show-types
121 When showing sockets, show the type of the socket.
122
123 --job-mode=
124 When queuing a new job, this option controls how to deal with
125 already queued jobs. It takes one of "fail", "replace",
126 "replace-irreversibly", "isolate", "ignore-dependencies",
127 "ignore-requirements" or "flush". Defaults to "replace", except
128 when the isolate command is used which implies the "isolate" job
129 mode.
130
131 If "fail" is specified and a requested operation conflicts with a
132 pending job (more specifically: causes an already pending start job
133 to be reversed into a stop job or vice versa), cause the operation
134 to fail.
135
136 If "replace" (the default) is specified, any conflicting pending
137 job will be replaced, as necessary.
138
139 If "replace-irreversibly" is specified, operate like "replace", but
140 also mark the new jobs as irreversible. This prevents future
141 conflicting transactions from replacing these jobs (or even being
142 enqueued while the irreversible jobs are still pending).
143 Irreversible jobs can still be cancelled using the cancel command.
144 This job mode should be used on any transaction which pulls in
145 shutdown.target.
146
147 "isolate" is only valid for start operations and causes all other
148 units to be stopped when the specified unit is started. This mode
149 is always used when the isolate command is used.
150
151 "flush" will cause all queued jobs to be canceled when the new job
152 is enqueued.
153
154 If "ignore-dependencies" is specified, then all unit dependencies
155 are ignored for this new job and the operation is executed
156 immediately. If passed, no required units of the unit passed will
157 be pulled in, and no ordering dependencies will be honored. This is
158 mostly a debugging and rescue tool for the administrator and should
159 not be used by applications.
160
161 "ignore-requirements" is similar to "ignore-dependencies", but only
162 causes the requirement dependencies to be ignored, the ordering
163 dependencies will still be honored.
164
165 --fail
166 Shorthand for --job-mode=fail.
167
168 When used with the kill command, if no units were killed, the
169 operation results in an error.
170
171 -i, --ignore-inhibitors
172 When system shutdown or a sleep state is requested, ignore
173 inhibitor locks. Applications can establish inhibitor locks to
174 avoid that certain important operations (such as CD burning or
175 suchlike) are interrupted by system shutdown or a sleep state. Any
176 user may take these locks and privileged users may override these
177 locks. If any locks are taken, shutdown and sleep state requests
178 will normally fail (regardless of whether privileged or not) and a
179 list of active locks is printed. However, if --ignore-inhibitors is
180 specified, the locks are ignored and not printed, and the operation
181 attempted anyway, possibly requiring additional privileges.
182
183 --dry-run
184 Just print what would be done. Currently supported by verbs halt,
185 poweroff, reboot, kexec, suspend, hibernate, hybrid-sleep, default,
186 rescue, emergency, and exit.
187
188 -q, --quiet
189 Suppress printing of the results of various commands and also the
190 hints about truncated log lines. This does not suppress output of
191 commands for which the printed output is the only result (like
192 show). Errors are always printed.
193
194 --no-block
195 Do not synchronously wait for the requested operation to finish. If
196 this is not specified, the job will be verified, enqueued and
197 systemctl will wait until the unit's start-up is completed. By
198 passing this argument, it is only verified and enqueued. This
199 option may not be combined with --wait.
200
201 --wait
202 Synchronously wait for started units to terminate again. This
203 option may not be combined with --no-block. Note that this will
204 wait forever if any given unit never terminates (by itself or by
205 getting stopped explicitly); particularly services which use
206 "RemainAfterExit=yes".
207
208 --user
209 Talk to the service manager of the calling user, rather than the
210 service manager of the system.
211
212 --system
213 Talk to the service manager of the system. This is the implied
214 default.
215
216 --failed
217 List units in failed state. This is equivalent to --state=failed.
218
219 --no-wall
220 Do not send wall message before halt, power-off and reboot.
221
222 --global
223 When used with enable and disable, operate on the global user
224 configuration directory, thus enabling or disabling a unit file
225 globally for all future logins of all users.
226
227 --no-reload
228 When used with enable and disable, do not implicitly reload daemon
229 configuration after executing the changes.
230
231 --no-ask-password
232 When used with start and related commands, disables asking for
233 passwords. Background services may require input of a password or
234 passphrase string, for example to unlock system hard disks or
235 cryptographic certificates. Unless this option is specified and the
236 command is invoked from a terminal, systemctl will query the user
237 on the terminal for the necessary secrets. Use this option to
238 switch this behavior off. In this case, the password must be
239 supplied by some other means (for example graphical password
240 agents) or the service might fail. This also disables querying the
241 user for authentication for privileged operations.
242
243 --kill-who=
244 When used with kill, choose which processes to send a signal to.
245 Must be one of main, control or all to select whether to kill only
246 the main process, the control process or all processes of the unit.
247 The main process of the unit is the one that defines the life-time
248 of it. A control process of a unit is one that is invoked by the
249 manager to induce state changes of it. For example, all processes
250 started due to the ExecStartPre=, ExecStop= or ExecReload= settings
251 of service units are control processes. Note that there is only one
252 control process per unit at a time, as only one state change is
253 executed at a time. For services of type Type=forking, the initial
254 process started by the manager for ExecStart= is a control process,
255 while the process ultimately forked off by that one is then
256 considered the main process of the unit (if it can be determined).
257 This is different for service units of other types, where the
258 process forked off by the manager for ExecStart= is always the main
259 process itself. A service unit consists of zero or one main
260 process, zero or one control process plus any number of additional
261 processes. Not all unit types manage processes of these types
262 however. For example, for mount units, control processes are
263 defined (which are the invocations of /usr/bin/mount and
264 /usr/bin/umount), but no main process is defined. If omitted,
265 defaults to all.
266
267 -s, --signal=
268 When used with kill, choose which signal to send to selected
269 processes. Must be one of the well-known signal specifiers such as
270 SIGTERM, SIGINT or SIGSTOP. If omitted, defaults to SIGTERM.
271
272 -f, --force
273 When used with enable, overwrite any existing conflicting symlinks.
274
275 When used with edit, create all of the specified units which do not
276 already exist.
277
278 When used with halt, poweroff, reboot or kexec, execute the
279 selected operation without shutting down all units. However, all
280 processes will be killed forcibly and all file systems are
281 unmounted or remounted read-only. This is hence a drastic but
282 relatively safe option to request an immediate reboot. If --force
283 is specified twice for these operations (with the exception of
284 kexec), they will be executed immediately, without terminating any
285 processes or unmounting any file systems. Warning: specifying
286 --force twice with any of these operations might result in data
287 loss. Note that when --force is specified twice the selected
288 operation is executed by systemctl itself, and the system manager
289 is not contacted. This means the command should succeed even when
290 the system manager has crashed.
291
292 --message=
293 When used with halt, poweroff or reboot, set a short message
294 explaining the reason for the operation. The message will be logged
295 together with the default shutdown message.
296
297 --now
298 When used with enable, the units will also be started. When used
299 with disable or mask, the units will also be stopped. The start or
300 stop operation is only carried out when the respective enable or
301 disable operation has been successful.
302
303 --root=
304 When used with enable/disable/is-enabled (and related commands),
305 use the specified root path when looking for unit files. If this
306 option is present, systemctl will operate on the file system
307 directly, instead of communicating with the systemd daemon to carry
308 out changes.
309
310 --runtime
311 When used with enable, disable, edit, (and related commands), make
312 changes only temporarily, so that they are lost on the next reboot.
313 This will have the effect that changes are not made in
314 subdirectories of /etc but in /run, with identical immediate
315 effects, however, since the latter is lost on reboot, the changes
316 are lost too.
317
318 Similarly, when used with set-property, make changes only
319 temporarily, so that they are lost on the next reboot.
320
321 --preset-mode=
322 Takes one of "full" (the default), "enable-only", "disable-only".
323 When used with the preset or preset-all commands, controls whether
324 units shall be disabled and enabled according to the preset rules,
325 or only enabled, or only disabled.
326
327 -n, --lines=
328 When used with status, controls the number of journal lines to
329 show, counting from the most recent ones. Takes a positive integer
330 argument. Defaults to 10.
331
332 -o, --output=
333 When used with status, controls the formatting of the journal
334 entries that are shown. For the available choices, see
335 journalctl(1). Defaults to "short".
336
337 --firmware-setup
338 When used with the reboot command, indicate to the system's
339 firmware to boot into setup mode. Note that this is currently only
340 supported on some EFI systems and only if the system was booted in
341 EFI mode.
342
343 --plain
344 When used with list-dependencies, list-units or list-machines, the
345 output is printed as a list instead of a tree, and the bullet
346 circles are omitted.
347
348 -H, --host=
349 Execute the operation remotely. Specify a hostname, or a username
350 and hostname separated by "@", to connect to. The hostname may
351 optionally be suffixed by a container name, separated by ":", which
352 connects directly to a specific container on the specified host.
353 This will use SSH to talk to the remote machine manager instance.
354 Container names may be enumerated with machinectl -H HOST.
355
356 -M, --machine=
357 Execute operation on a local container. Specify a container name to
358 connect to.
359
360 --no-pager
361 Do not pipe output into a pager.
362
363 --no-legend
364 Do not print the legend, i.e. column headers and the footer with
365 hints.
366
367 -h, --help
368 Print a short help text and exit.
369
370 --version
371 Print a short version string and exit.
372
374 The following commands are understood:
375
376 Unit Commands
377 list-units [PATTERN...]
378 List units that systemd currently has in memory. This includes
379 units that are either referenced directly or through a dependency,
380 units that are pinned by applications programmatically, or units
381 that were active in the past and have failed. By default only units
382 which are active, have pending jobs, or have failed are shown; this
383 can be changed with option --all. If one or more PATTERNs are
384 specified, only units matching one of them are shown. The units
385 that are shown are additionally filtered by --type= and --state= if
386 those options are specified.
387
388 Produces output similar to
389
390 UNIT LOAD ACTIVE SUB DESCRIPTION
391 sys-module-fuse.device loaded active plugged /sys/module/fuse
392 -.mount loaded active mounted Root Mount
393 boot-efi.mount loaded active mounted /boot/efi
394 systemd-journald.service loaded active running Journal Service
395 systemd-logind.service loaded active running Login Service
396 ● user@1000.service loaded active running User Manager for UID 1000
397 ...
398 systemd-tmpfiles-clean.timer loaded active waiting Daily Cleanup of Temporary Directories
399
400 LOAD = Reflects whether the unit definition was properly loaded.
401 ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
402 SUB = The low-level unit activation state, values depend on unit type.
403
404 123 loaded units listed. Pass --all to see loaded but inactive units, too.
405 To show all installed unit files use 'systemctl list-unit-files'.
406
407
408 The header and the last unit of a given type are underlined if the
409 terminal supports that. A colored dot is shown next to services
410 which were masked, not found, or otherwise failed.
411
412 The LOAD column shows the load state, one of loaded, not-found,
413 bad-setting, error, masked. The ACTIVE columns shows the general
414 unit state, one of active, reloading, inactive, failed, activating,
415 deactivating. The SUB column shows the unit-type-specific detailed
416 state of the unit, possible values vary by unit type. The list of
417 possible LOAD, ACTIVE, and SUB states is not constant and new
418 systemd releases may both add and remove values.
419
420 systemctl --state=help
421
422 command maybe be used to display the current set of possible
423 values.
424
425 This is the default command.
426
427 list-sockets [PATTERN...]
428 List socket units currently in memory, ordered by listening
429 address. If one or more PATTERNs are specified, only socket units
430 matching one of them are shown. Produces output similar to
431
432 LISTEN UNIT ACTIVATES
433 /dev/initctl systemd-initctl.socket systemd-initctl.service
434 ...
435 [::]:22 sshd.socket sshd.service
436 kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
437
438 5 sockets listed.
439
440 Note: because the addresses might contains spaces, this output is
441 not suitable for programmatic consumption.
442
443 Also see --show-types, --all, and --state=.
444
445 list-timers [PATTERN...]
446 List timer units currently in memory, ordered by the time they
447 elapse next. If one or more PATTERNs are specified, only units
448 matching one of them are shown. Produces output similar to
449
450 NEXT LEFT LAST PASSED UNIT ACTIVATES
451 n/a n/a Thu 2017-02-23 13:40:29 EST 3 days ago ureadahead-stop.timer ureadahead-stop.service
452 Sun 2017-02-26 18:55:42 EST 1min 14s left Thu 2017-02-23 13:54:44 EST 3 days ago systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.service
453 Sun 2017-02-26 20:37:16 EST 1h 42min left Sun 2017-02-26 11:56:36 EST 6h ago apt-daily.timer apt-daily.service
454 Sun 2017-02-26 20:57:49 EST 2h 3min left Sun 2017-02-26 11:56:36 EST 6h ago snapd.refresh.timer snapd.refresh.service
455
456
457 NEXT shows the next time the timer will run.
458
459 LEFT shows how long till the next time the timer runs.
460
461 LAST shows the last time the timer ran.
462
463 PASSED shows how long has passed since the timer last ran.
464
465 UNIT shows the name of the timer
466
467 ACTIVATES shows the name the service the timer activates when it
468 runs.
469
470 Also see --all and --state=.
471
472 start PATTERN...
473 Start (activate) one or more units specified on the command line.
474
475 Note that glob patterns operate on the set of primary names of
476 units currently in memory. Units which are not active and are not
477 in a failed state usually are not in memory, and will not be
478 matched by any pattern. In addition, in case of instantiated units,
479 systemd is often unaware of the instance name until the instance
480 has been started. Therefore, using glob patterns with start has
481 limited usefulness. Also, secondary alias names of units are not
482 considered.
483
484 stop PATTERN...
485 Stop (deactivate) one or more units specified on the command line.
486
487 reload PATTERN...
488 Asks all units listed on the command line to reload their
489 configuration. Note that this will reload the service-specific
490 configuration, not the unit configuration file of systemd. If you
491 want systemd to reload the configuration file of a unit, use the
492 daemon-reload command. In other words: for the example case of
493 Apache, this will reload Apache's httpd.conf in the web server, not
494 the apache.service systemd unit file.
495
496 This command should not be confused with the daemon-reload command.
497
498 restart PATTERN...
499 Stop and then start one or more units specified on the command
500 line. If the units are not running yet, they will be started.
501
502 Note that restarting a unit with this command does not necessarily
503 flush out all of the unit's resources before it is started again.
504 For example, the per-service file descriptor storage facility (see
505 FileDescriptorStoreMax= in systemd.service(5)) will remain intact
506 as long as the unit has a job pending, and is only cleared when the
507 unit is fully stopped and no jobs are pending anymore. If it is
508 intended that the file descriptor store is flushed out, too, during
509 a restart operation an explicit systemctl stop command followed by
510 systemctl start should be issued.
511
512 try-restart PATTERN...
513 Stop and then start one or more units specified on the command line
514 if the units are running. This does nothing if units are not
515 running.
516
517 reload-or-restart PATTERN...
518 Reload one or more units if they support it. If not, stop and then
519 start them instead. If the units are not running yet, they will be
520 started.
521
522 try-reload-or-restart PATTERN...
523 Reload one or more units if they support it. If not, stop and then
524 start them instead. This does nothing if the units are not running.
525
526 isolate UNIT
527 Start the unit specified on the command line and its dependencies
528 and stop all others, unless they have IgnoreOnIsolate=yes (see
529 systemd.unit(5)). If a unit name with no extension is given, an
530 extension of ".target" will be assumed.
531
532 This is similar to changing the runlevel in a traditional init
533 system. The isolate command will immediately stop processes that
534 are not enabled in the new unit, possibly including the graphical
535 environment or terminal you are currently using.
536
537 Note that this is allowed only on units where AllowIsolate= is
538 enabled. See systemd.unit(5) for details.
539
540 kill PATTERN...
541 Send a signal to one or more processes of the unit. Use --kill-who=
542 to select which process to kill. Use --signal= to select the signal
543 to send.
544
545 is-active PATTERN...
546 Check whether any of the specified units are active (i.e. running).
547 Returns an exit code 0 if at least one is active, or non-zero
548 otherwise. Unless --quiet is specified, this will also print the
549 current unit state to standard output.
550
551 is-failed PATTERN...
552 Check whether any of the specified units are in a "failed" state.
553 Returns an exit code 0 if at least one has failed, non-zero
554 otherwise. Unless --quiet is specified, this will also print the
555 current unit state to standard output.
556
557 status [PATTERN...|PID...]]
558 Show terse runtime status information about one or more units,
559 followed by most recent log data from the journal. If no units are
560 specified, show system status. If combined with --all, also show
561 the status of all units (subject to limitations specified with -t).
562 If a PID is passed, show information about the unit the process
563 belongs to.
564
565 This function is intended to generate human-readable output. If you
566 are looking for computer-parsable output, use show instead. By
567 default, this function only shows 10 lines of output and ellipsizes
568 lines to fit in the terminal window. This can be changed with
569 --lines and --full, see above. In addition, journalctl --unit=NAME
570 or journalctl --user-unit=NAME use a similar filter for messages
571 and might be more convenient.
572
573 systemd implicitly loads units as necessary, so just running the
574 status will attempt to load a file. The command is thus not useful
575 for determining if something was already loaded or not. The units
576 may possibly also be quickly unloaded after the operation is
577 completed if there's no reason to keep it in memory thereafter.
578
579 Example 1. Example output from systemctl status
580
581 $ systemctl status bluetooth
582 ● bluetooth.service - Bluetooth service
583 Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
584 Active: active (running) since Wed 2017-01-04 13:54:04 EST; 1 weeks 0 days ago
585 Docs: man:bluetoothd(8)
586 Main PID: 930 (bluetoothd)
587 Status: "Running"
588 Tasks: 1
589 Memory: 648.0K
590 CPU: 435ms
591 CGroup: /system.slice/bluetooth.service
592 └─930 /usr/lib/bluetooth/bluetoothd
593
594 Jan 12 10:46:45 example.com bluetoothd[8900]: Not enough free handles to register service
595 Jan 12 10:46:45 example.com bluetoothd[8900]: Current Time Service could not be registered
596 Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output error (5)
597
598 The dot ("●") uses color on supported terminals to summarize the
599 unit state at a glance. White indicates an "inactive" or
600 "deactivating" state. Red indicates a "failed" or "error" state and
601 green indicates an "active", "reloading" or "activating" state.
602
603 The "Loaded:" line in the output will show "loaded" if the unit has
604 been loaded into memory. Other possible values for "Loaded:"
605 include: "error" if there was a problem loading it, "not-found" if
606 not unit file was found for this unit, "bad-setting" if an
607 essential unit file setting could not be parsed and "masked" if the
608 unit file has been masked. Along with showing the path to the unit
609 file, this line will also show the enablement state. Enabled
610 commands start at boot. See the full table of possible enablement
611 states — including the definition of "masked" — in the
612 documentation for the is-enabled command.
613
614 The "Active:" line shows active state. The value is usually
615 "active" or "inactive". Active could mean started, bound, plugged
616 in, etc depending on the unit type. The unit could also be in
617 process of changing states, reporting a state of "activating" or
618 "deactivating". A special "failed" state is entered when the
619 service failed in some way, such as a crash, exiting with an error
620 code or timing out. If the failed state is entered the cause will
621 be logged for later reference.
622
623 show [PATTERN...|JOB...]
624 Show properties of one or more units, jobs, or the manager itself.
625 If no argument is specified, properties of the manager will be
626 shown. If a unit name is specified, properties of the unit are
627 shown, and if a job ID is specified, properties of the job are
628 shown. By default, empty properties are suppressed. Use --all to
629 show those too. To select specific properties to show, use
630 --property=. This command is intended to be used whenever
631 computer-parsable output is required. Use status if you are looking
632 for formatted human-readable output.
633
634 Many properties shown by systemctl show map directly to
635 configuration settings of the system and service manager and its
636 unit files. Note that the properties shown by the command are
637 generally more low-level, normalized versions of the original
638 configuration settings and expose runtime state in addition to
639 configuration. For example, properties shown for service units
640 include the service's current main process identifier as "MainPID"
641 (which is runtime state), and time settings are always exposed as
642 properties ending in the "...USec" suffix even if a matching
643 configuration options end in "...Sec", because microseconds is the
644 normalized time unit used by the system and service manager.
645
646 cat PATTERN...
647 Show backing files of one or more units. Prints the "fragment" and
648 "drop-ins" (source files) of units. Each file is preceded by a
649 comment which includes the file name. Note that this shows the
650 contents of the backing files on disk, which may not match the
651 system manager's understanding of these units if any unit files
652 were updated on disk and the daemon-reload command wasn't issued
653 since.
654
655 set-property UNIT PROPERTY=VALUE...
656 Set the specified unit properties at runtime where this is
657 supported. This allows changing configuration parameter properties
658 such as resource control settings at runtime. Not all properties
659 may be changed at runtime, but many resource control settings
660 (primarily those in systemd.resource-control(5)) may. The changes
661 are applied immediately, and stored on disk for future boots,
662 unless --runtime is passed, in which case the settings only apply
663 until the next reboot. The syntax of the property assignment
664 follows closely the syntax of assignments in unit files.
665
666 Example: systemctl set-property foobar.service CPUShares=777
667
668 If the specified unit appears to be inactive, the changes will be
669 only stored on disk as described previously hence they will be
670 effective when the unit will be started.
671
672 Note that this command allows changing multiple properties at the
673 same time, which is preferable over setting them individually. Like
674 with unit file configuration settings, assigning an empty list will
675 reset the property.
676
677 help PATTERN...|PID...
678 Show manual pages for one or more units, if available. If a PID is
679 given, the manual pages for the unit the process belongs to are
680 shown.
681
682 reset-failed [PATTERN...]
683 Reset the "failed" state of the specified units, or if no unit name
684 is passed, reset the state of all units. When a unit fails in some
685 way (i.e. process exiting with non-zero error code, terminating
686 abnormally or timing out), it will automatically enter the "failed"
687 state and its exit code and status is recorded for introspection by
688 the administrator until the service is stopped/re-started or reset
689 with this command.
690
691 list-dependencies [UNIT]
692 Shows units required and wanted by the specified unit. This
693 recursively lists units following the Requires=, Requisite=,
694 ConsistsOf=, Wants=, BindsTo= dependencies. If no unit is
695 specified, default.target is implied.
696
697 By default, only target units are recursively expanded. When --all
698 is passed, all other units are recursively expanded as well.
699
700 Options --reverse, --after, --before may be used to change what
701 types of dependencies are shown.
702
703 Unit File Commands
704 list-unit-files [PATTERN...]
705 List unit files installed on the system, in combination with their
706 enablement state (as reported by is-enabled). If one or more
707 PATTERNs are specified, only unit files whose name matches one of
708 them are shown (patterns matching unit file system paths are not
709 supported).
710
711 enable UNIT..., enable PATH...
712 Enable one or more units or unit instances. This will create a set
713 of symlinks, as encoded in the "[Install]" sections of the
714 indicated unit files. After the symlinks have been created, the
715 system manager configuration is reloaded (in a way equivalent to
716 daemon-reload), in order to ensure the changes are taken into
717 account immediately. Note that this does not have the effect of
718 also starting any of the units being enabled. If this is desired,
719 combine this command with the --now switch, or invoke start with
720 appropriate arguments later. Note that in case of unit instance
721 enablement (i.e. enablement of units of the form foo@bar.service),
722 symlinks named the same as instances are created in the unit
723 configuration directory, however they point to the single template
724 unit file they are instantiated from.
725
726 This command expects either valid unit names (in which case various
727 unit file directories are automatically searched for unit files
728 with appropriate names), or absolute paths to unit files (in which
729 case these files are read directly). If a specified unit file is
730 located outside of the usual unit file directories, an additional
731 symlink is created, linking it into the unit configuration path,
732 thus ensuring it is found when requested by commands such as start.
733 The file system where the linked unit files are located must be
734 accessible when systemd is started (e.g. anything underneath /home
735 or /var is not allowed, unless those directories are located on the
736 root file system).
737
738 This command will print the file system operations executed. This
739 output may be suppressed by passing --quiet.
740
741 Note that this operation creates only the symlinks suggested in the
742 "[Install]" section of the unit files. While this command is the
743 recommended way to manipulate the unit configuration directory, the
744 administrator is free to make additional changes manually by
745 placing or removing symlinks below this directory. This is
746 particularly useful to create configurations that deviate from the
747 suggested default installation. In this case, the administrator
748 must make sure to invoke daemon-reload manually as necessary, in
749 order to ensure the changes are taken into account.
750
751 Enabling units should not be confused with starting (activating)
752 units, as done by the start command. Enabling and starting units is
753 orthogonal: units may be enabled without being started and started
754 without being enabled. Enabling simply hooks the unit into various
755 suggested places (for example, so that the unit is automatically
756 started on boot or when a particular kind of hardware is plugged
757 in). Starting actually spawns the daemon process (in case of
758 service units), or binds the socket (in case of socket units), and
759 so on.
760
761 Depending on whether --system, --user, --runtime, or --global is
762 specified, this enables the unit for the system, for the calling
763 user only, for only this boot of the system, or for all future
764 logins of all users. Note that in the last case, no systemd daemon
765 configuration is reloaded.
766
767 Using enable on masked units is not supported and results in an
768 error.
769
770 disable UNIT...
771 Disables one or more units. This removes all symlinks to the unit
772 files backing the specified units from the unit configuration
773 directory, and hence undoes any changes made by enable or link.
774 Note that this removes all symlinks to matching unit files,
775 including manually created symlinks, and not just those actually
776 created by enable or link. Note that while disable undoes the
777 effect of enable, the two commands are otherwise not symmetric, as
778 disable may remove more symlinks than a prior enable invocation of
779 the same unit created.
780
781 This command expects valid unit names only, it does not accept
782 paths to unit files.
783
784 In addition to the units specified as arguments, all units are
785 disabled that are listed in the Also= setting contained in the
786 "[Install]" section of any of the unit files being operated on.
787
788 This command implicitly reloads the system manager configuration
789 after completing the operation. Note that this command does not
790 implicitly stop the units that are being disabled. If this is
791 desired, either combine this command with the --now switch, or
792 invoke the stop command with appropriate arguments later.
793
794 This command will print information about the file system
795 operations (symlink removals) executed. This output may be
796 suppressed by passing --quiet.
797
798 This command honors --system, --user, --runtime and --global in a
799 similar way as enable.
800
801 reenable UNIT...
802 Reenable one or more units, as specified on the command line. This
803 is a combination of disable and enable and is useful to reset the
804 symlinks a unit file is enabled with to the defaults configured in
805 its "[Install]" section. This command expects a unit name only, it
806 does not accept paths to unit files.
807
808 preset UNIT...
809 Reset the enable/disable status one or more unit files, as
810 specified on the command line, to the defaults configured in the
811 preset policy files. This has the same effect as disable or enable,
812 depending how the unit is listed in the preset files.
813
814 Use --preset-mode= to control whether units shall be enabled and
815 disabled, or only enabled, or only disabled.
816
817 If the unit carries no install information, it will be silently
818 ignored by this command. UNIT must be the real unit name, any
819 alias names are ignored silently.
820
821 For more information on the preset policy format, see
822 systemd.preset(5). For more information on the concept of presets,
823 please consult the Preset[1] document.
824
825 preset-all
826 Resets all installed unit files to the defaults configured in the
827 preset policy file (see above).
828
829 Use --preset-mode= to control whether units shall be enabled and
830 disabled, or only enabled, or only disabled.
831
832 is-enabled UNIT...
833 Checks whether any of the specified unit files are enabled (as with
834 enable). Returns an exit code of 0 if at least one is enabled,
835 non-zero otherwise. Prints the current enable status (see table).
836 To suppress this output, use --quiet. To show installation targets,
837 use --full.
838
839 Table 1. is-enabled output
840 ┌──────────────────┬─────────────────────────┬───────────┐
841 │Name │ Description │ Exit Code │
842 ├──────────────────┼─────────────────────────┼───────────┤
843 │"enabled" │ Enabled via │ │
844 ├──────────────────┤ .wants/, .requires/ │ │
845 │"enabled-runtime" │ or Alias= symlinks │ │
846 │ │ (permanently in │ 0 │
847 │ │ /etc/systemd/system/, │ │
848 │ │ or transiently in │ │
849 │ │ /run/systemd/system/). │ │
850 ├──────────────────┼─────────────────────────┼───────────┤
851 │"linked" │ Made available through │ │
852 ├──────────────────┤ one or more symlinks │ │
853 │"linked-runtime" │ to the unit file │ │
854 │ │ (permanently in │ │
855 │ │ /etc/systemd/system/ │ │
856 │ │ or transiently in │ > 0 │
857 │ │ /run/systemd/system/), │ │
858 │ │ even though the unit │ │
859 │ │ file might reside │ │
860 │ │ outside of the unit │ │
861 │ │ file search path. │ │
862 ├──────────────────┼─────────────────────────┼───────────┤
863 │"masked" │ Completely disabled, │ │
864 ├──────────────────┤ so that any start │ │
865 │"masked-runtime" │ operation on it fails │ │
866 │ │ (permanently in │ > 0 │
867 │ │ /etc/systemd/system/ │ │
868 │ │ or transiently in │ │
869 │ │ /run/systemd/systemd/). │ │
870 ├──────────────────┼─────────────────────────┼───────────┤
871 │"static" │ The unit file is not │ 0 │
872 │ │ enabled, and has no │ │
873 │ │ provisions for enabling │ │
874 │ │ in the "[Install]" unit │ │
875 │ │ file section. │ │
876 ├──────────────────┼─────────────────────────┼───────────┤
877 │"indirect" │ The unit file itself is │ 0 │
878 │ │ not enabled, but it has │ │
879 │ │ a non-empty Also= │ │
880 │ │ setting in the │ │
881 │ │ "[Install]" unit file │ │
882 │ │ section, listing other │ │
883 │ │ unit files that might │ │
884 │ │ be enabled, or it has │ │
885 │ │ an alias under a │ │
886 │ │ different name through │ │
887 │ │ a symlink that is not │ │
888 │ │ specified in Also=. For │ │
889 │ │ template unit file, an │ │
890 │ │ instance different than │ │
891 │ │ the one specified in │ │
892 │ │ DefaultInstance= is │ │
893 │ │ enabled. │ │
894 ├──────────────────┼─────────────────────────┼───────────┤
895 │"disabled" │ The unit file is not │ > 0 │
896 │ │ enabled, but contains │ │
897 │ │ an "[Install]" section │ │
898 │ │ with installation │ │
899 │ │ instructions. │ │
900 ├──────────────────┼─────────────────────────┼───────────┤
901 │"generated" │ The unit file was │ 0 │
902 │ │ generated dynamically │ │
903 │ │ via a generator tool. │ │
904 │ │ See │ │
905 │ │ systemd.generator(7). │ │
906 │ │ Generated unit files │ │
907 │ │ may not be enabled, │ │
908 │ │ they are enabled │ │
909 │ │ implicitly by their │ │
910 │ │ generator. │ │
911 ├──────────────────┼─────────────────────────┼───────────┤
912 │"transient" │ The unit file has been │ 0 │
913 │ │ created dynamically │ │
914 │ │ with the runtime API. │ │
915 │ │ Transient units may not │ │
916 │ │ be enabled. │ │
917 ├──────────────────┼─────────────────────────┼───────────┤
918 │"bad" │ The unit file is │ > 0 │
919 │ │ invalid or another │ │
920 │ │ error occurred. Note │ │
921 │ │ that is-enabled will │ │
922 │ │ not actually return │ │
923 │ │ this state, but print │ │
924 │ │ an error message │ │
925 │ │ instead. However the │ │
926 │ │ unit file listing │ │
927 │ │ printed by │ │
928 │ │ list-unit-files might │ │
929 │ │ show it. │ │
930 └──────────────────┴─────────────────────────┴───────────┘
931
932 mask UNIT...
933 Mask one or more units, as specified on the command line. This will
934 link these unit files to /dev/null, making it impossible to start
935 them. This is a stronger version of disable, since it prohibits all
936 kinds of activation of the unit, including enablement and manual
937 activation. Use this option with care. This honors the --runtime
938 option to only mask temporarily until the next reboot of the
939 system. The --now option may be used to ensure that the units are
940 also stopped. This command expects valid unit names only, it does
941 not accept unit file paths.
942
943 unmask UNIT...
944 Unmask one or more unit files, as specified on the command line.
945 This will undo the effect of mask. This command expects valid unit
946 names only, it does not accept unit file paths.
947
948 link PATH...
949 Link a unit file that is not in the unit file search paths into the
950 unit file search path. This command expects an absolute path to a
951 unit file. The effect of this may be undone with disable. The
952 effect of this command is that a unit file is made available for
953 commands such as start, even though it is not installed directly in
954 the unit search path. The file system where the linked unit files
955 are located must be accessible when systemd is started (e.g.
956 anything underneath /home or /var is not allowed, unless those
957 directories are located on the root file system).
958
959 revert UNIT...
960 Revert one or more unit files to their vendor versions. This
961 command removes drop-in configuration files that modify the
962 specified units, as well as any user-configured unit file that
963 overrides a matching vendor supplied unit file. Specifically, for a
964 unit "foo.service" the matching directories "foo.service.d/" with
965 all their contained files are removed, both below the persistent
966 and runtime configuration directories (i.e. below
967 /etc/systemd/system and /run/systemd/system); if the unit file has
968 a vendor-supplied version (i.e. a unit file located below /usr) any
969 matching persistent or runtime unit file that overrides it is
970 removed, too. Note that if a unit file has no vendor-supplied
971 version (i.e. is only defined below /etc/systemd/system or
972 /run/systemd/system, but not in a unit file stored below /usr),
973 then it is not removed. Also, if a unit is masked, it is unmasked.
974
975 Effectively, this command may be used to undo all changes made with
976 systemctl edit, systemctl set-property and systemctl mask and puts
977 the original unit file with its settings back in effect.
978
979 add-wants TARGET UNIT..., add-requires TARGET UNIT...
980 Adds "Wants=" or "Requires=" dependencies, respectively, to the
981 specified TARGET for one or more units.
982
983 This command honors --system, --user, --runtime and --global in a
984 way similar to enable.
985
986 edit UNIT...
987 Edit a drop-in snippet or a whole replacement file if --full is
988 specified, to extend or override the specified unit.
989
990 Depending on whether --system (the default), --user, or --global is
991 specified, this command creates a drop-in file for each unit either
992 for the system, for the calling user, or for all futures logins of
993 all users. Then, the editor (see the "Environment" section below)
994 is invoked on temporary files which will be written to the real
995 location if the editor exits successfully.
996
997 If --full is specified, this will copy the original units instead
998 of creating drop-in files.
999
1000 If --force is specified and any units do not already exist, new
1001 unit files will be opened for editing.
1002
1003 If --runtime is specified, the changes will be made temporarily in
1004 /run and they will be lost on the next reboot.
1005
1006 If the temporary file is empty upon exit, the modification of the
1007 related unit is canceled.
1008
1009 After the units have been edited, systemd configuration is reloaded
1010 (in a way that is equivalent to daemon-reload).
1011
1012 Note that this command cannot be used to remotely edit units and
1013 that you cannot temporarily edit units which are in /etc, since
1014 they take precedence over /run.
1015
1016 get-default
1017 Return the default target to boot into. This returns the target
1018 unit name default.target is aliased (symlinked) to.
1019
1020 set-default TARGET
1021 Set the default target to boot into. This sets (symlinks) the
1022 default.target alias to the given target unit.
1023
1024 Machine Commands
1025 list-machines [PATTERN...]
1026 List the host and all running local containers with their state. If
1027 one or more PATTERNs are specified, only containers matching one of
1028 them are shown.
1029
1030 Job Commands
1031 list-jobs [PATTERN...]
1032 List jobs that are in progress. If one or more PATTERNs are
1033 specified, only jobs for units matching one of them are shown.
1034
1035 When combined with --after or --before the list is augmented with
1036 information on which other job each job is waiting for, and which
1037 other jobs are waiting for it, see above.
1038
1039 cancel JOB...
1040 Cancel one or more jobs specified on the command line by their
1041 numeric job IDs. If no job ID is specified, cancel all pending
1042 jobs.
1043
1044 Environment Commands
1045 show-environment
1046 Dump the systemd manager environment block. This is the environment
1047 block that is passed to all processes the manager spawns. The
1048 environment block will be dumped in straight-forward form suitable
1049 for sourcing into most shells. If no special characters or
1050 whitespace is present in the variable values, no escaping is
1051 performed, and the assignments have the form "VARIABLE=value". If
1052 whitespace or characters which have special meaning to the shell
1053 are present, dollar-single-quote escaping is used, and assignments
1054 have the form "VARIABLE=$'value'". This syntax is known to be
1055 supported by bash(1), zsh(1), ksh(1), and busybox(1)'s ash(1), but
1056 not dash(1) or fish(1).
1057
1058 set-environment VARIABLE=VALUE...
1059 Set one or more systemd manager environment variables, as specified
1060 on the command line.
1061
1062 unset-environment VARIABLE...
1063 Unset one or more systemd manager environment variables. If only a
1064 variable name is specified, it will be removed regardless of its
1065 value. If a variable and a value are specified, the variable is
1066 only removed if it has the specified value.
1067
1068 import-environment [VARIABLE...]
1069 Import all, one or more environment variables set on the client
1070 into the systemd manager environment block. If no arguments are
1071 passed, the entire environment block is imported. Otherwise, a list
1072 of one or more environment variable names should be passed, whose
1073 client-side values are then imported into the manager's environment
1074 block.
1075
1076 Manager Lifecycle Commands
1077 daemon-reload
1078 Reload the systemd manager configuration. This will rerun all
1079 generators (see systemd.generator(7)), reload all unit files, and
1080 recreate the entire dependency tree. While the daemon is being
1081 reloaded, all sockets systemd listens on behalf of user
1082 configuration will stay accessible.
1083
1084 This command should not be confused with the reload command.
1085
1086 daemon-reexec
1087 Reexecute the systemd manager. This will serialize the manager
1088 state, reexecute the process and deserialize the state again. This
1089 command is of little use except for debugging and package upgrades.
1090 Sometimes, it might be helpful as a heavy-weight daemon-reload.
1091 While the daemon is being reexecuted, all sockets systemd listening
1092 on behalf of user configuration will stay accessible.
1093
1094 System Commands
1095 is-system-running
1096 Checks whether the system is operational. This returns success
1097 (exit code 0) when the system is fully up and running, specifically
1098 not in startup, shutdown or maintenance mode, and with no failed
1099 services. Failure is returned otherwise (exit code non-zero). In
1100 addition, the current state is printed in a short string to
1101 standard output, see the table below. Use --quiet to suppress this
1102 output.
1103
1104 Table 2. is-system-running output
1105 ┌─────────────┬─────────────────────┬───────────┐
1106 │Name │ Description │ Exit Code │
1107 ├─────────────┼─────────────────────┼───────────┤
1108 │initializing │ Early bootup, │ > 0 │
1109 │ │ before basic.target │ │
1110 │ │ is reached or the │ │
1111 │ │ maintenance state │ │
1112 │ │ entered. │ │
1113 ├─────────────┼─────────────────────┼───────────┤
1114 │starting │ Late bootup, before │ > 0 │
1115 │ │ the job queue │ │
1116 │ │ becomes idle for │ │
1117 │ │ the first time, or │ │
1118 │ │ one of the rescue │ │
1119 │ │ targets are │ │
1120 │ │ reached. │ │
1121 ├─────────────┼─────────────────────┼───────────┤
1122 │running │ The system is fully │ 0 │
1123 │ │ operational. │ │
1124 ├─────────────┼─────────────────────┼───────────┤
1125 │degraded │ The system is │ > 0 │
1126 │ │ operational but one │ │
1127 │ │ or more units │ │
1128 │ │ failed. │ │
1129 ├─────────────┼─────────────────────┼───────────┤
1130 │maintenance │ The rescue or │ > 0 │
1131 │ │ emergency target is │ │
1132 │ │ active. │ │
1133 ├─────────────┼─────────────────────┼───────────┤
1134 │stopping │ The manager is │ > 0 │
1135 │ │ shutting down. │ │
1136 ├─────────────┼─────────────────────┼───────────┤
1137 │offline │ The manager is not │ > 0 │
1138 │ │ running. │ │
1139 │ │ Specifically, this │ │
1140 │ │ is the operational │ │
1141 │ │ state if an │ │
1142 │ │ incompatible │ │
1143 │ │ program is running │ │
1144 │ │ as system manager │ │
1145 │ │ (PID 1). │ │
1146 ├─────────────┼─────────────────────┼───────────┤
1147 │unknown │ The operational │ > 0 │
1148 │ │ state could not be │ │
1149 │ │ determined, due to │ │
1150 │ │ lack of resources │ │
1151 │ │ or another error │ │
1152 │ │ cause. │ │
1153 └─────────────┴─────────────────────┴───────────┘
1154
1155 default
1156 Enter default mode. This is equivalent to systemctl isolate
1157 default.target. This operation is blocking by default, use
1158 --no-block to request asynchronous behavior.
1159
1160 rescue
1161 Enter rescue mode. This is equivalent to systemctl isolate
1162 rescue.target. This operation is blocking by default, use
1163 --no-block to request asynchronous behavior.
1164
1165 emergency
1166 Enter emergency mode. This is equivalent to systemctl isolate
1167 emergency.target. This operation is blocking by default, use
1168 --no-block to request asynchronous behavior.
1169
1170 halt
1171 Shut down and halt the system. This is mostly equivalent to
1172 systemctl start halt.target --job-mode=replace-irreversibly
1173 --no-block, but also prints a wall message to all users. This
1174 command is asynchronous; it will return after the halt operation is
1175 enqueued, without waiting for it to complete. Note that this
1176 operation will simply halt the OS kernel after shutting down,
1177 leaving the hardware powered on. Use systemctl poweroff for
1178 powering off the system (see below).
1179
1180 If combined with --force, shutdown of all running services is
1181 skipped, however all processes are killed and all file systems are
1182 unmounted or mounted read-only, immediately followed by the system
1183 halt. If --force is specified twice, the operation is immediately
1184 executed without terminating any processes or unmounting any file
1185 systems. This may result in data loss. Note that when --force is
1186 specified twice the halt operation is executed by systemctl itself,
1187 and the system manager is not contacted. This means the command
1188 should succeed even when the system manager has crashed.
1189
1190 poweroff
1191 Shut down and power-off the system. This is mostly equivalent to
1192 systemctl start poweroff.target --job-mode=replace-irreversibly
1193 --no-block, but also prints a wall message to all users. This
1194 command is asynchronous; it will return after the power-off
1195 operation is enqueued, without waiting for it to complete.
1196
1197 If combined with --force, shutdown of all running services is
1198 skipped, however all processes are killed and all file systems are
1199 unmounted or mounted read-only, immediately followed by the
1200 powering off. If --force is specified twice, the operation is
1201 immediately executed without terminating any processes or
1202 unmounting any file systems. This may result in data loss. Note
1203 that when --force is specified twice the power-off operation is
1204 executed by systemctl itself, and the system manager is not
1205 contacted. This means the command should succeed even when the
1206 system manager has crashed.
1207
1208 reboot [arg]
1209 Shut down and reboot the system. This is mostly equivalent to
1210 systemctl start reboot.target --job-mode=replace-irreversibly
1211 --no-block, but also prints a wall message to all users. This
1212 command is asynchronous; it will return after the reboot operation
1213 is enqueued, without waiting for it to complete.
1214
1215 If combined with --force, shutdown of all running services is
1216 skipped, however all processes are killed and all file systems are
1217 unmounted or mounted read-only, immediately followed by the reboot.
1218 If --force is specified twice, the operation is immediately
1219 executed without terminating any processes or unmounting any file
1220 systems. This may result in data loss. Note that when --force is
1221 specified twice the reboot operation is executed by systemctl
1222 itself, and the system manager is not contacted. This means the
1223 command should succeed even when the system manager has crashed.
1224
1225 If the optional argument arg is given, it will be passed as the
1226 optional argument to the reboot(2) system call. The value is
1227 architecture and firmware specific. As an example, "recovery" might
1228 be used to trigger system recovery, and "fota" might be used to
1229 trigger a “firmware over the air” update.
1230
1231 kexec
1232 Shut down and reboot the system via kexec. This is equivalent to
1233 systemctl start kexec.target --job-mode=replace-irreversibly
1234 --no-block. This command is asynchronous; it will return after the
1235 reboot operation is enqueued, without waiting for it to complete.
1236
1237 If combined with --force, shutdown of all running services is
1238 skipped, however all processes are killed and all file systems are
1239 unmounted or mounted read-only, immediately followed by the reboot.
1240
1241 exit [EXIT_CODE]
1242 Ask the service manager to quit. This is only supported for user
1243 service managers (i.e. in conjunction with the --user option) or in
1244 containers and is equivalent to poweroff otherwise. This command is
1245 asynchronous; it will return after the exit operation is enqueued,
1246 without waiting for it to complete.
1247
1248 The service manager will exit with the specified exit code, if
1249 EXIT_CODE is passed.
1250
1251 switch-root ROOT [INIT]
1252 Switches to a different root directory and executes a new system
1253 manager process below it. This is intended for usage in initial RAM
1254 disks ("initrd"), and will transition from the initrd's system
1255 manager process (a.k.a. "init" process) to the main system manager
1256 process which is loaded from the actual host volume. This call
1257 takes two arguments: the directory that is to become the new root
1258 directory, and the path to the new system manager binary below it
1259 to execute as PID 1. If the latter is omitted or the empty string,
1260 a systemd binary will automatically be searched for and used as
1261 init. If the system manager path is omitted, equal to the empty
1262 string or identical to the path to the systemd binary, the state of
1263 the initrd's system manager process is passed to the main system
1264 manager, which allows later introspection of the state of the
1265 services involved in the initrd boot phase.
1266
1267 suspend
1268 Suspend the system. This will trigger activation of the special
1269 target unit suspend.target. This command is asynchronous, and will
1270 return after the suspend operation is successfully enqueued. It
1271 will not wait for the suspend/resume cycle to complete.
1272
1273 hibernate
1274 Hibernate the system. This will trigger activation of the special
1275 target unit hibernate.target. This command is asynchronous, and
1276 will return after the hibernation operation is successfully
1277 enqueued. It will not wait for the hibernate/thaw cycle to
1278 complete.
1279
1280 hybrid-sleep
1281 Hibernate and suspend the system. This will trigger activation of
1282 the special target unit hybrid-sleep.target. This command is
1283 asynchronous, and will return after the hybrid sleep operation is
1284 successfully enqueued. It will not wait for the sleep/wake-up cycle
1285 to complete.
1286
1287 Parameter Syntax
1288 Unit commands listed above take either a single unit name (designated
1289 as UNIT), or multiple unit specifications (designated as PATTERN...).
1290 In the first case, the unit name with or without a suffix must be
1291 given. If the suffix is not specified (unit name is "abbreviated"),
1292 systemctl will append a suitable suffix, ".service" by default, and a
1293 type-specific suffix in case of commands which operate only on specific
1294 unit types. For example,
1295
1296 # systemctl start sshd
1297
1298 and
1299
1300 # systemctl start sshd.service
1301
1302 are equivalent, as are
1303
1304 # systemctl isolate default
1305
1306 and
1307
1308 # systemctl isolate default.target
1309
1310 Note that (absolute) paths to device nodes are automatically converted
1311 to device unit names, and other (absolute) paths to mount unit names.
1312
1313 # systemctl status /dev/sda
1314 # systemctl status /home
1315
1316 are equivalent to:
1317
1318 # systemctl status dev-sda.device
1319 # systemctl status home.mount
1320
1321 In the second case, shell-style globs will be matched against the
1322 primary names of all units currently in memory; literal unit names,
1323 with or without a suffix, will be treated as in the first case. This
1324 means that literal unit names always refer to exactly one unit, but
1325 globs may match zero units and this is not considered an error.
1326
1327 Glob patterns use fnmatch(3), so normal shell-style globbing rules are
1328 used, and "*", "?", "[]" may be used. See glob(7) for more details. The
1329 patterns are matched against the primary names of units currently in
1330 memory, and patterns which do not match anything are silently skipped.
1331 For example:
1332
1333 # systemctl stop sshd@*.service
1334
1335 will stop all sshd@.service instances. Note that alias names of units,
1336 and units that aren't in memory are not considered for glob expansion.
1337
1338 For unit file commands, the specified UNIT should be the name of the
1339 unit file (possibly abbreviated, see above), or the absolute path to
1340 the unit file:
1341
1342 # systemctl enable foo.service
1343
1344 or
1345
1346 # systemctl link /path/to/foo.service
1347
1348
1350 On success, 0 is returned, a non-zero failure code otherwise.
1351
1353 $SYSTEMD_EDITOR
1354 Editor to use when editing units; overrides $EDITOR and $VISUAL. If
1355 neither $SYSTEMD_EDITOR nor $EDITOR nor $VISUAL are present or if
1356 it is set to an empty string or if their execution failed,
1357 systemctl will try to execute well known editors in this order:
1358 editor(1), nano(1), vim(1), vi(1).
1359
1360 $SYSTEMD_PAGER
1361 Pager to use when --no-pager is not given; overrides $PAGER. If
1362 neither $SYSTEMD_PAGER nor $PAGER are set, a set of well-known
1363 pager implementations are tried in turn, including less(1) and
1364 more(1), until one is found. If no pager implementation is
1365 discovered no pager is invoked. Setting this environment variable
1366 to an empty string or the value "cat" is equivalent to passing
1367 --no-pager.
1368
1369 $SYSTEMD_LESS
1370 Override the options passed to less (by default "FRSXMK").
1371
1372 $SYSTEMD_LESSCHARSET
1373 Override the charset passed to less (by default "utf-8", if the
1374 invoking terminal is determined to be UTF-8 compatible).
1375
1377 systemd(1), journalctl(1), loginctl(1), machinectl(1), systemd.unit(5),
1378 systemd.resource-control(5), systemd.special(7), wall(1),
1379 systemd.preset(5), systemd.generator(7), glob(7)
1380
1382 1. Preset
1383 https://www.freedesktop.org/wiki/Software/systemd/Preset
1384
1385
1386
1387systemd 239 SYSTEMCTL(1)