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 commands are understood:
19
20 Unit Commands (Introspection and Modification)
21 list-units [PATTERN...]
22 List units that systemd currently has in memory. This includes
23 units that are either referenced directly or through a dependency,
24 units that are pinned by applications programmatically, or units
25 that were active in the past and have failed. By default only units
26 which are active, have pending jobs, or have failed are shown; this
27 can be changed with option --all. If one or more PATTERNs are
28 specified, only units matching one of them are shown. The units
29 that are shown are additionally filtered by --type= and --state= if
30 those options are specified.
31
32 Note that this command does not show unit templates, but only
33 instances of unit templates. Units templates that aren't
34 instantiated are not runnable, and will thus never show up in the
35 output of this command. Specifically this means that foo@.service
36 will never be shown in this list — unless instantiated, e.g. as
37 foo@bar.service. Use list-unit-files (see below) for listing
38 installed unit template files.
39
40 Produces output similar to
41
42 UNIT LOAD ACTIVE SUB DESCRIPTION
43 sys-module-fuse.device loaded active plugged /sys/module/fuse
44 -.mount loaded active mounted Root Mount
45 boot-efi.mount loaded active mounted /boot/efi
46 systemd-journald.service loaded active running Journal Service
47 systemd-logind.service loaded active running Login Service
48 ● user@1000.service loaded failed failed User Manager for UID 1000
49 ...
50 systemd-tmpfiles-clean.timer loaded active waiting Daily Cleanup of Temporary Directories
51
52 LOAD = Reflects whether the unit definition was properly loaded.
53 ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
54 SUB = The low-level unit activation state, values depend on unit type.
55
56 123 loaded units listed. Pass --all to see loaded but inactive units, too.
57 To show all installed unit files use 'systemctl list-unit-files'.
58
59 The header and the last unit of a given type are underlined if the
60 terminal supports that. A colored dot is shown next to services
61 which were masked, not found, or otherwise failed.
62
63 The LOAD column shows the load state, one of loaded, not-found,
64 bad-setting, error, masked. The ACTIVE columns shows the general
65 unit state, one of active, reloading, inactive, failed, activating,
66 deactivating. The SUB column shows the unit-type-specific detailed
67 state of the unit, possible values vary by unit type. The list of
68 possible LOAD, ACTIVE, and SUB states is not constant and new
69 systemd releases may both add and remove values.
70
71 systemctl --state=help
72
73 command maybe be used to display the current set of possible
74 values.
75
76 This is the default command.
77
78 list-sockets [PATTERN...]
79 List socket units currently in memory, ordered by listening
80 address. If one or more PATTERNs are specified, only socket units
81 matching one of them are shown. Produces output similar to
82
83 LISTEN UNIT ACTIVATES
84 /dev/initctl systemd-initctl.socket systemd-initctl.service
85 ...
86 [::]:22 sshd.socket sshd.service
87 kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
88
89 5 sockets listed.
90
91 Note: because the addresses might contains spaces, this output is
92 not suitable for programmatic consumption.
93
94 Also see --show-types, --all, and --state=.
95
96 list-timers [PATTERN...]
97 List timer units currently in memory, ordered by the time they
98 elapse next. If one or more PATTERNs are specified, only units
99 matching one of them are shown. Produces output similar to
100
101 NEXT LEFT LAST PASSED UNIT ACTIVATES
102 n/a n/a Thu 2017-02-23 13:40:29 EST 3 days ago ureadahead-stop.timer ureadahead-stop.service
103 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
104 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
105 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
106
107
108 NEXT shows the next time the timer will run.
109
110 LEFT shows how long till the next time the timer runs.
111
112 LAST shows the last time the timer ran.
113
114 PASSED shows how long has passed since the timer last ran.
115
116 UNIT shows the name of the timer
117
118 ACTIVATES shows the name the service the timer activates when it
119 runs.
120
121 Also see --all and --state=.
122
123 is-active PATTERN...
124 Check whether any of the specified units are active (i.e. running).
125 Returns an exit code 0 if at least one is active, or non-zero
126 otherwise. Unless --quiet is specified, this will also print the
127 current unit state to standard output.
128
129 is-failed PATTERN...
130 Check whether any of the specified units are in a "failed" state.
131 Returns an exit code 0 if at least one has failed, non-zero
132 otherwise. Unless --quiet is specified, this will also print the
133 current unit state to standard output.
134
135 status [PATTERN...|PID...]]
136 Show terse runtime status information about one or more units,
137 followed by most recent log data from the journal. If no units are
138 specified, show system status. If combined with --all, also show
139 the status of all units (subject to limitations specified with -t).
140 If a PID is passed, show information about the unit the process
141 belongs to.
142
143 This function is intended to generate human-readable output. If you
144 are looking for computer-parsable output, use show instead. By
145 default, this function only shows 10 lines of output and ellipsizes
146 lines to fit in the terminal window. This can be changed with
147 --lines and --full, see above. In addition, journalctl --unit=NAME
148 or journalctl --user-unit=NAME use a similar filter for messages
149 and might be more convenient.
150
151 systemd implicitly loads units as necessary, so just running the
152 status will attempt to load a file. The command is thus not useful
153 for determining if something was already loaded or not. The units
154 may possibly also be quickly unloaded after the operation is
155 completed if there's no reason to keep it in memory thereafter.
156
157 Example 1. Example output from systemctl status
158
159 $ systemctl status bluetooth
160 ● bluetooth.service - Bluetooth service
161 Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
162 Active: active (running) since Wed 2017-01-04 13:54:04 EST; 1 weeks 0 days ago
163 Docs: man:bluetoothd(8)
164 Main PID: 930 (bluetoothd)
165 Status: "Running"
166 Tasks: 1
167 Memory: 648.0K
168 CPU: 435ms
169 CGroup: /system.slice/bluetooth.service
170 └─930 /usr/lib/bluetooth/bluetoothd
171
172 Jan 12 10:46:45 example.com bluetoothd[8900]: Not enough free handles to register service
173 Jan 12 10:46:45 example.com bluetoothd[8900]: Current Time Service could not be registered
174 Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output error (5)
175
176 The dot ("●") uses color on supported terminals to summarize the
177 unit state at a glance. Along with its color, its shape varies
178 according to its state: "inactive" or "maintenance" is a white
179 circle ("○"), "active" is a green dot ("●"), "deactivating" is a
180 white dot, "failed" or "error" is a red cross ("×"), and
181 "reloading" is a green clockwise circle arrow ("↻").
182
183 The "Loaded:" line in the output will show "loaded" if the unit has
184 been loaded into memory. Other possible values for "Loaded:"
185 include: "error" if there was a problem loading it, "not-found" if
186 no unit file was found for this unit, "bad-setting" if an essential
187 unit file setting could not be parsed and "masked" if the unit file
188 has been masked. Along with showing the path to the unit file, this
189 line will also show the enablement state. Enabled commands start at
190 boot. See the full table of possible enablement states — including
191 the definition of "masked" — in the documentation for the
192 is-enabled command.
193
194 The "Active:" line shows active state. The value is usually
195 "active" or "inactive". Active could mean started, bound, plugged
196 in, etc depending on the unit type. The unit could also be in
197 process of changing states, reporting a state of "activating" or
198 "deactivating". A special "failed" state is entered when the
199 service failed in some way, such as a crash, exiting with an error
200 code or timing out. If the failed state is entered the cause will
201 be logged for later reference.
202
203 show [PATTERN...|JOB...]
204 Show properties of one or more units, jobs, or the manager itself.
205 If no argument is specified, properties of the manager will be
206 shown. If a unit name is specified, properties of the unit are
207 shown, and if a job ID is specified, properties of the job are
208 shown. By default, empty properties are suppressed. Use --all to
209 show those too. To select specific properties to show, use
210 --property=. This command is intended to be used whenever
211 computer-parsable output is required. Use status if you are looking
212 for formatted human-readable output.
213
214 Many properties shown by systemctl show map directly to
215 configuration settings of the system and service manager and its
216 unit files. Note that the properties shown by the command are
217 generally more low-level, normalized versions of the original
218 configuration settings and expose runtime state in addition to
219 configuration. For example, properties shown for service units
220 include the service's current main process identifier as "MainPID"
221 (which is runtime state), and time settings are always exposed as
222 properties ending in the "...USec" suffix even if a matching
223 configuration options end in "...Sec", because microseconds is the
224 normalized time unit used internally by the system and service
225 manager.
226
227 For details about many of these properties, see the documentation
228 of the D-Bus interface backing these properties, see
229 org.freedesktop.systemd1(5).
230
231 cat PATTERN...
232 Show backing files of one or more units. Prints the "fragment" and
233 "drop-ins" (source files) of units. Each file is preceded by a
234 comment which includes the file name. Note that this shows the
235 contents of the backing files on disk, which may not match the
236 system manager's understanding of these units if any unit files
237 were updated on disk and the daemon-reload command wasn't issued
238 since.
239
240 help PATTERN...|PID...
241 Show manual pages for one or more units, if available. If a PID is
242 given, the manual pages for the unit the process belongs to are
243 shown.
244
245 list-dependencies [UNIT...]
246 Shows units required and wanted by the specified units. This
247 recursively lists units following the Requires=, Requisite=,
248 ConsistsOf=, Wants=, BindsTo= dependencies. If no units are
249 specified, default.target is implied.
250
251 By default, only target units are recursively expanded. When --all
252 is passed, all other units are recursively expanded as well.
253
254 Options --reverse, --after, --before may be used to change what
255 types of dependencies are shown.
256
257 Note that this command only lists units currently loaded into
258 memory by the service manager. In particular, this command is not
259 suitable to get a comprehensive list at all reverse dependencies on
260 a specific unit, as it won't list the dependencies declared by
261 units currently not loaded.
262
263 start PATTERN...
264 Start (activate) one or more units specified on the command line.
265
266 Note that unit glob patterns expand to names of units currently in
267 memory. Units which are not active and are not in a failed state
268 usually are not in memory, and will not be matched by any pattern.
269 In addition, in case of instantiated units, systemd is often
270 unaware of the instance name until the instance has been started.
271 Therefore, using glob patterns with start has limited usefulness.
272 Also, secondary alias names of units are not considered.
273
274 Option --all may be used to also operate on inactive units which
275 are referenced by other loaded units. Note that this is not the
276 same as operating on "all" possible units, because as the previous
277 paragraph describes, such a list is ill-defined. Nevertheless,
278 systemctl start --all GLOB may be useful if all the units that
279 should match the pattern are pulled in by some target which is
280 known to be loaded.
281
282 stop PATTERN...
283 Stop (deactivate) one or more units specified on the command line.
284
285 This command will fail if the unit does not exist or if stopping of
286 the unit is prohibited (see RefuseManualStop= in systemd.unit(5)).
287 It will not fail if any of the commands configured to stop the unit
288 (ExecStop=, etc.) fail, because the manager will still forcibly
289 terminate the unit.
290
291 reload PATTERN...
292 Asks all units listed on the command line to reload their
293 configuration. Note that this will reload the service-specific
294 configuration, not the unit configuration file of systemd. If you
295 want systemd to reload the configuration file of a unit, use the
296 daemon-reload command. In other words: for the example case of
297 Apache, this will reload Apache's httpd.conf in the web server, not
298 the apache.service systemd unit file.
299
300 This command should not be confused with the daemon-reload command.
301
302 restart PATTERN...
303 Stop and then start one or more units specified on the command
304 line. If the units are not running yet, they will be started.
305
306 Note that restarting a unit with this command does not necessarily
307 flush out all of the unit's resources before it is started again.
308 For example, the per-service file descriptor storage facility (see
309 FileDescriptorStoreMax= in systemd.service(5)) will remain intact
310 as long as the unit has a job pending, and is only cleared when the
311 unit is fully stopped and no jobs are pending anymore. If it is
312 intended that the file descriptor store is flushed out, too, during
313 a restart operation an explicit systemctl stop command followed by
314 systemctl start should be issued.
315
316 try-restart PATTERN...
317 Stop and then start one or more units specified on the command line
318 if the units are running. This does nothing if units are not
319 running.
320
321 reload-or-restart PATTERN...
322 Reload one or more units if they support it. If not, stop and then
323 start them instead. If the units are not running yet, they will be
324 started.
325
326 try-reload-or-restart PATTERN...
327 Reload one or more units if they support it. If not, stop and then
328 start them instead. This does nothing if the units are not running.
329
330 isolate UNIT
331 Start the unit specified on the command line and its dependencies
332 and stop all others, unless they have IgnoreOnIsolate=yes (see
333 systemd.unit(5)). If a unit name with no extension is given, an
334 extension of ".target" will be assumed.
335
336 This command is dangerous, since it will immediately stop processes
337 that are not enabled in the new target, possibly including the
338 graphical environment or terminal you are currently using.
339
340 Note that this is allowed only on units where AllowIsolate= is
341 enabled. See systemd.unit(5) for details.
342
343 kill PATTERN...
344 Send a signal to one or more processes of the unit. Use --kill-who=
345 to select which process to kill. Use --signal= to select the signal
346 to send.
347
348 clean PATTERN...
349 Remove the configuration, state, cache, logs or runtime data of the
350 specified units. Use --what= to select which kind of resource to
351 remove. For service units this may be used to remove the
352 directories configured with ConfigurationDirectory=,
353 StateDirectory=, CacheDirectory=, LogsDirectory= and
354 RuntimeDirectory=, see systemd.exec(5) for details. For timer units
355 this may be used to clear out the persistent timestamp data if
356 Persistent= is used and --what=state is selected, see
357 systemd.timer(5). This command only applies to units that use
358 either of these settings. If --what= is not specified, both the
359 cache and runtime data are removed (as these two types of data are
360 generally redundant and reproducible on the next invocation of the
361 unit).
362
363 freeze PATTERN...
364 Freeze one or more units specified on the command line using cgroup
365 freezer
366
367 Freezing the unit will cause all processes contained within the
368 cgroup corresponding to the unit to be suspended. Being suspended
369 means that unit's processes won't be scheduled to run on CPU until
370 thawed. Note that this command is supported only on systems that
371 use unified cgroup hierarchy. Unit is automatically thawed just
372 before we execute a job against the unit, e.g. before the unit is
373 stopped.
374
375 thaw PATTERN...
376 Thaw (unfreeze) one or more units specified on the command line.
377
378 This is the inverse operation to the freeze command and resumes the
379 execution of processes in the unit's cgroup.
380
381 set-property UNIT PROPERTY=VALUE...
382 Set the specified unit properties at runtime where this is
383 supported. This allows changing configuration parameter properties
384 such as resource control settings at runtime. Not all properties
385 may be changed at runtime, but many resource control settings
386 (primarily those in systemd.resource-control(5)) may. The changes
387 are applied immediately, and stored on disk for future boots,
388 unless --runtime is passed, in which case the settings only apply
389 until the next reboot. The syntax of the property assignment
390 follows closely the syntax of assignments in unit files.
391
392 Example: systemctl set-property foobar.service CPUWeight=200
393
394 If the specified unit appears to be inactive, the changes will be
395 only stored on disk as described previously hence they will be
396 effective when the unit will be started.
397
398 Note that this command allows changing multiple properties at the
399 same time, which is preferable over setting them individually.
400
401 Example: systemctl set-property foobar.service CPUWeight=200
402 MemoryMax=2G IPAccounting=yes
403
404 Like with unit file configuration settings, assigning an empty
405 setting usually resets a property to its defaults.
406
407 Example: systemctl set-property avahi-daemon.service IPAddressDeny=
408
409 bind UNIT PATH [PATH]
410 Bind-mounts a file or directory from the host into the specified
411 unit's mount namespace. The first path argument is the source file
412 or directory on the host, the second path argument is the
413 destination file or directory in the unit's mount namespace. When
414 the latter is omitted, the destination path in the unit's mount
415 namespace is the same as the source path on the host. When combined
416 with the --read-only switch, a ready-only bind mount is created.
417 When combined with the --mkdir switch, the destination path is
418 first created before the mount is applied.
419
420 Note that this option is currently only supported for units that
421 run within a mount namespace (e.g.: with RootImage=,
422 PrivateMounts=, etc.). This command supports bind-mounting
423 directories, regular files, device nodes, AF_UNIX socket nodes, as
424 well as FIFOs. The bind mount is ephemeral, and it is undone as
425 soon as the current unit process exists. Note that the namespace
426 mentioned here, where the bind mount will be added to, is the one
427 where the main service process runs. Other processes (those
428 exececuted by ExecReload=, ExecStartPre=, etc.) run in distinct
429 namespaces.
430
431 mount-image UNIT IMAGE [PATH [PARTITION_NAME:MOUNT_OPTIONS]]
432 Mounts an image from the host into the specified unit's mount
433 namespace. The first path argument is the source image on the host,
434 the second path argument is the destination directory in the unit's
435 mount namespace (i.e. inside RootImage=/RootDirectory=). The
436 following argument, if any, is interpreted as a colon-separated
437 tuple of partition name and comma-separated list of mount options
438 for that partition. The format is the same as the service
439 MountImages= setting. When combined with the --read-only switch, a
440 ready-only mount is created. When combined with the --mkdir switch,
441 the destination path is first created before the mount is applied.
442
443 Note that this option is currently only supported for units that
444 run within a mount namespace (i.e. with RootImage=, PrivateMounts=,
445 etc.). Note that the namespace mentioned here where the image mount
446 will be added to, is the one where the main service process runs.
447 Note that the namespace mentioned here, where the bind mount will
448 be added to, is the one where the main service process runs. Other
449 processes (those exececuted by ExecReload=, ExecStartPre=, etc.)
450 run in distinct namespaces.
451
452 Example:
453
454 systemctl mount-image foo.service /tmp/img.raw /var/lib/image root:ro,nosuid
455
456
457
458 systemctl mount-image --mkdir bar.service /tmp/img.raw /var/lib/baz/img
459
460
461 service-log-level SERVICE [LEVEL]
462 If the LEVEL argument is not given, print the current log level as
463 reported by service SERVICE.
464
465 If the optional argument LEVEL is provided, then change the current
466 log level of the service to LEVEL. The log level should be a
467 typical syslog log level, i.e. a value in the range 0...7 or one of
468 the strings emerg, alert, crit, err, warning, notice, info, debug;
469 see syslog(3) for details.
470
471 The service must have the appropriate BusName=destination property
472 and also implement the generic org.freedesktop.LogControl1(5)
473 interface. (systemctl will use the generic D-Bus protocol to access
474 the org.freedesktop.LogControl1.LogLevel interface for the D-Bus
475 name destination.)
476
477 service-log-target SERVICE [TARGET]
478 If the TARGET argument is not given, print the current log target
479 as reported by service SERVICE.
480
481 If the optional argument TARGET is provided, then change the
482 current log target of the service to TARGET. The log target should
483 be one of the strings console (for log output to the service's
484 standard error stream), kmsg (for log output to the kernel log
485 buffer), journal (for log output to systemd-journald.service(8)
486 using the native journal protocol), syslog (for log output to the
487 classic syslog socket /dev/log), null (for no log output
488 whatsoever) or auto (for an automatically determined choice,
489 typically equivalent to console if the service is invoked
490 interactively, and journal or syslog otherwise).
491
492 For most services, only a small subset of log targets make sense.
493 In particular, most "normal" services should only implement
494 console, journal, and null. Anything else is only appropriate for
495 low-level services that are active in very early boot before proper
496 logging is established.
497
498 The service must have the appropriate BusName=destination property
499 and also implement the generic org.freedesktop.LogControl1(5)
500 interface. (systemctl will use the generic D-Bus protocol to access
501 the org.freedesktop.LogControl1.LogLevel interface for the D-Bus
502 name destination.)
503
504 reset-failed [PATTERN...]
505 Reset the "failed" state of the specified units, or if no unit name
506 is passed, reset the state of all units. When a unit fails in some
507 way (i.e. process exiting with non-zero error code, terminating
508 abnormally or timing out), it will automatically enter the "failed"
509 state and its exit code and status is recorded for introspection by
510 the administrator until the service is stopped/re-started or reset
511 with this command.
512
513 In addition to resetting the "failed" state of a unit it also
514 resets various other per-unit properties: the start rate limit
515 counter of all unit types is reset to zero, as is the restart
516 counter of service units. Thus, if a unit's start limit (as
517 configured with StartLimitIntervalSec=/StartLimitBurst=) is hit and
518 the unit refuses to be started again, use this command to make it
519 startable again.
520
521 Unit File Commands
522 list-unit-files [PATTERN...]
523 List unit files installed on the system, in combination with their
524 enablement state (as reported by is-enabled). If one or more
525 PATTERNs are specified, only unit files whose name matches one of
526 them are shown (patterns matching unit file system paths are not
527 supported).
528
529 Unlike list-units this command will list template units in addition
530 to explicitly instantiated units.
531
532 enable UNIT..., enable PATH...
533 Enable one or more units or unit instances. This will create a set
534 of symlinks, as encoded in the [Install] sections of the indicated
535 unit files. After the symlinks have been created, the system
536 manager configuration is reloaded (in a way equivalent to
537 daemon-reload), in order to ensure the changes are taken into
538 account immediately. Note that this does not have the effect of
539 also starting any of the units being enabled. If this is desired,
540 combine this command with the --now switch, or invoke start with
541 appropriate arguments later. Note that in case of unit instance
542 enablement (i.e. enablement of units of the form foo@bar.service),
543 symlinks named the same as instances are created in the unit
544 configuration directory, however they point to the single template
545 unit file they are instantiated from.
546
547 This command expects either valid unit names (in which case various
548 unit file directories are automatically searched for unit files
549 with appropriate names), or absolute paths to unit files (in which
550 case these files are read directly). If a specified unit file is
551 located outside of the usual unit file directories, an additional
552 symlink is created, linking it into the unit configuration path,
553 thus ensuring it is found when requested by commands such as start.
554 The file system where the linked unit files are located must be
555 accessible when systemd is started (e.g. anything underneath /home/
556 or /var/ is not allowed, unless those directories are located on
557 the root file system).
558
559 This command will print the file system operations executed. This
560 output may be suppressed by passing --quiet.
561
562 Note that this operation creates only the symlinks suggested in the
563 [Install] section of the unit files. While this command is the
564 recommended way to manipulate the unit configuration directory, the
565 administrator is free to make additional changes manually by
566 placing or removing symlinks below this directory. This is
567 particularly useful to create configurations that deviate from the
568 suggested default installation. In this case, the administrator
569 must make sure to invoke daemon-reload manually as necessary, in
570 order to ensure the changes are taken into account.
571
572 Enabling units should not be confused with starting (activating)
573 units, as done by the start command. Enabling and starting units is
574 orthogonal: units may be enabled without being started and started
575 without being enabled. Enabling simply hooks the unit into various
576 suggested places (for example, so that the unit is automatically
577 started on boot or when a particular kind of hardware is plugged
578 in). Starting actually spawns the daemon process (in case of
579 service units), or binds the socket (in case of socket units), and
580 so on.
581
582 Depending on whether --system, --user, --runtime, or --global is
583 specified, this enables the unit for the system, for the calling
584 user only, for only this boot of the system, or for all future
585 logins of all users. Note that in the last case, no systemd daemon
586 configuration is reloaded.
587
588 Using enable on masked units is not supported and results in an
589 error.
590
591 disable UNIT...
592 Disables one or more units. This removes all symlinks to the unit
593 files backing the specified units from the unit configuration
594 directory, and hence undoes any changes made by enable or link.
595 Note that this removes all symlinks to matching unit files,
596 including manually created symlinks, and not just those actually
597 created by enable or link. Note that while disable undoes the
598 effect of enable, the two commands are otherwise not symmetric, as
599 disable may remove more symlinks than a prior enable invocation of
600 the same unit created.
601
602 This command expects valid unit names only, it does not accept
603 paths to unit files.
604
605 In addition to the units specified as arguments, all units are
606 disabled that are listed in the Also= setting contained in the
607 [Install] section of any of the unit files being operated on.
608
609 This command implicitly reloads the system manager configuration
610 after completing the operation. Note that this command does not
611 implicitly stop the units that are being disabled. If this is
612 desired, either combine this command with the --now switch, or
613 invoke the stop command with appropriate arguments later.
614
615 This command will print information about the file system
616 operations (symlink removals) executed. This output may be
617 suppressed by passing --quiet.
618
619 This command honors --system, --user, --runtime and --global in a
620 similar way as enable.
621
622 reenable UNIT...
623 Reenable one or more units, as specified on the command line. This
624 is a combination of disable and enable and is useful to reset the
625 symlinks a unit file is enabled with to the defaults configured in
626 its [Install] section. This command expects a unit name only, it
627 does not accept paths to unit files.
628
629 preset UNIT...
630 Reset the enable/disable status one or more unit files, as
631 specified on the command line, to the defaults configured in the
632 preset policy files. This has the same effect as disable or enable,
633 depending how the unit is listed in the preset files.
634
635 Use --preset-mode= to control whether units shall be enabled and
636 disabled, or only enabled, or only disabled.
637
638 If the unit carries no install information, it will be silently
639 ignored by this command. UNIT must be the real unit name, any
640 alias names are ignored silently.
641
642 For more information on the preset policy format, see
643 systemd.preset(5).
644
645 preset-all
646 Resets all installed unit files to the defaults configured in the
647 preset policy file (see above).
648
649 Use --preset-mode= to control whether units shall be enabled and
650 disabled, or only enabled, or only disabled.
651
652 is-enabled UNIT...
653 Checks whether any of the specified unit files are enabled (as with
654 enable). Returns an exit code of 0 if at least one is enabled,
655 non-zero otherwise. Prints the current enable status (see table).
656 To suppress this output, use --quiet. To show installation targets,
657 use --full.
658
659 Table 1. is-enabled output
660 ┌──────────────────┬─────────────────────────┬───────────┐
661 │Name │ Description │ Exit Code │
662 ├──────────────────┼─────────────────────────┼───────────┤
663 │"enabled" │ Enabled via │ │
664 ├──────────────────┤ .wants/, .requires/ │ │
665 │"enabled-runtime" │ or Alias= symlinks │ │
666 │ │ (permanently in │ 0 │
667 │ │ /etc/systemd/system/, │ │
668 │ │ or transiently in │ │
669 │ │ /run/systemd/system/). │ │
670 ├──────────────────┼─────────────────────────┼───────────┤
671 │"linked" │ Made available through │ │
672 ├──────────────────┤ one or more symlinks │ │
673 │"linked-runtime" │ to the unit file │ │
674 │ │ (permanently in │ │
675 │ │ /etc/systemd/system/ │ │
676 │ │ or transiently in │ > 0 │
677 │ │ /run/systemd/system/), │ │
678 │ │ even though the unit │ │
679 │ │ file might reside │ │
680 │ │ outside of the unit │ │
681 │ │ file search path. │ │
682 ├──────────────────┼─────────────────────────┼───────────┤
683 │"alias" │ The name is an alias │ 0 │
684 │ │ (symlink to another │ │
685 │ │ unit file). │ │
686 ├──────────────────┼─────────────────────────┼───────────┤
687 │"masked" │ Completely disabled, │ │
688 ├──────────────────┤ so that any start │ │
689 │"masked-runtime" │ operation on it fails │ │
690 │ │ (permanently in │ > 0 │
691 │ │ /etc/systemd/system/ │ │
692 │ │ or transiently in │ │
693 │ │ /run/systemd/systemd/). │ │
694 ├──────────────────┼─────────────────────────┼───────────┤
695 │"static" │ The unit file is not │ 0 │
696 │ │ enabled, and has no │ │
697 │ │ provisions for enabling │ │
698 │ │ in the [Install] unit │ │
699 │ │ file section. │ │
700 ├──────────────────┼─────────────────────────┼───────────┤
701 │"indirect" │ The unit file itself is │ 0 │
702 │ │ not enabled, but it has │ │
703 │ │ a non-empty Also= │ │
704 │ │ setting in the │ │
705 │ │ [Install] unit file │ │
706 │ │ section, listing other │ │
707 │ │ unit files that might │ │
708 │ │ be enabled, or it has │ │
709 │ │ an alias under a │ │
710 │ │ different name through │ │
711 │ │ a symlink that is not │ │
712 │ │ specified in Also=. For │ │
713 │ │ template unit files, an │ │
714 │ │ instance different than │ │
715 │ │ the one specified in │ │
716 │ │ DefaultInstance= is │ │
717 │ │ enabled. │ │
718 ├──────────────────┼─────────────────────────┼───────────┤
719 │"disabled" │ The unit file is not │ > 0 │
720 │ │ enabled, but contains │ │
721 │ │ an [Install] section │ │
722 │ │ with installation │ │
723 │ │ instructions. │ │
724 ├──────────────────┼─────────────────────────┼───────────┤
725 │"generated" │ The unit file was │ 0 │
726 │ │ generated dynamically │ │
727 │ │ via a generator tool. │ │
728 │ │ See │ │
729 │ │ systemd.generator(7). │ │
730 │ │ Generated unit files │ │
731 │ │ may not be enabled, │ │
732 │ │ they are enabled │ │
733 │ │ implicitly by their │ │
734 │ │ generator. │ │
735 ├──────────────────┼─────────────────────────┼───────────┤
736 │"transient" │ The unit file has been │ 0 │
737 │ │ created dynamically │ │
738 │ │ with the runtime API. │ │
739 │ │ Transient units may not │ │
740 │ │ be enabled. │ │
741 ├──────────────────┼─────────────────────────┼───────────┤
742 │"bad" │ The unit file is │ > 0 │
743 │ │ invalid or another │ │
744 │ │ error occurred. Note │ │
745 │ │ that is-enabled will │ │
746 │ │ not actually return │ │
747 │ │ this state, but print │ │
748 │ │ an error message │ │
749 │ │ instead. However the │ │
750 │ │ unit file listing │ │
751 │ │ printed by │ │
752 │ │ list-unit-files might │ │
753 │ │ show it. │ │
754 └──────────────────┴─────────────────────────┴───────────┘
755
756 mask UNIT...
757 Mask one or more units, as specified on the command line. This will
758 link these unit files to /dev/null, making it impossible to start
759 them. This is a stronger version of disable, since it prohibits all
760 kinds of activation of the unit, including enablement and manual
761 activation. Use this option with care. This honors the --runtime
762 option to only mask temporarily until the next reboot of the
763 system. The --now option may be used to ensure that the units are
764 also stopped. This command expects valid unit names only, it does
765 not accept unit file paths.
766
767 unmask UNIT...
768 Unmask one or more unit files, as specified on the command line.
769 This will undo the effect of mask. This command expects valid unit
770 names only, it does not accept unit file paths.
771
772 link PATH...
773 Link a unit file that is not in the unit file search paths into the
774 unit file search path. This command expects an absolute path to a
775 unit file. The effect of this may be undone with disable. The
776 effect of this command is that a unit file is made available for
777 commands such as start, even though it is not installed directly in
778 the unit search path. The file system where the linked unit files
779 are located must be accessible when systemd is started (e.g.
780 anything underneath /home/ or /var/ is not allowed, unless those
781 directories are located on the root file system).
782
783 revert UNIT...
784 Revert one or more unit files to their vendor versions. This
785 command removes drop-in configuration files that modify the
786 specified units, as well as any user-configured unit file that
787 overrides a matching vendor supplied unit file. Specifically, for a
788 unit "foo.service" the matching directories "foo.service.d/" with
789 all their contained files are removed, both below the persistent
790 and runtime configuration directories (i.e. below
791 /etc/systemd/system and /run/systemd/system); if the unit file has
792 a vendor-supplied version (i.e. a unit file located below /usr/)
793 any matching persistent or runtime unit file that overrides it is
794 removed, too. Note that if a unit file has no vendor-supplied
795 version (i.e. is only defined below /etc/systemd/system or
796 /run/systemd/system, but not in a unit file stored below /usr/),
797 then it is not removed. Also, if a unit is masked, it is unmasked.
798
799 Effectively, this command may be used to undo all changes made with
800 systemctl edit, systemctl set-property and systemctl mask and puts
801 the original unit file with its settings back in effect.
802
803 add-wants TARGET UNIT..., add-requires TARGET UNIT...
804 Adds "Wants=" or "Requires=" dependencies, respectively, to the
805 specified TARGET for one or more units.
806
807 This command honors --system, --user, --runtime and --global in a
808 way similar to enable.
809
810 edit UNIT...
811 Edit a drop-in snippet or a whole replacement file if --full is
812 specified, to extend or override the specified unit.
813
814 Depending on whether --system (the default), --user, or --global is
815 specified, this command creates a drop-in file for each unit either
816 for the system, for the calling user, or for all futures logins of
817 all users. Then, the editor (see the "Environment" section below)
818 is invoked on temporary files which will be written to the real
819 location if the editor exits successfully.
820
821 If --full is specified, this will copy the original units instead
822 of creating drop-in files.
823
824 If --force is specified and any units do not already exist, new
825 unit files will be opened for editing.
826
827 If --runtime is specified, the changes will be made temporarily in
828 /run/ and they will be lost on the next reboot.
829
830 If the temporary file is empty upon exit, the modification of the
831 related unit is canceled.
832
833 After the units have been edited, systemd configuration is reloaded
834 (in a way that is equivalent to daemon-reload).
835
836 Note that this command cannot be used to remotely edit units and
837 that you cannot temporarily edit units which are in /etc/, since
838 they take precedence over /run/.
839
840 get-default
841 Return the default target to boot into. This returns the target
842 unit name default.target is aliased (symlinked) to.
843
844 set-default TARGET
845 Set the default target to boot into. This sets (symlinks) the
846 default.target alias to the given target unit.
847
848 Machine Commands
849 list-machines [PATTERN...]
850 List the host and all running local containers with their state. If
851 one or more PATTERNs are specified, only containers matching one of
852 them are shown.
853
854 Job Commands
855 list-jobs [PATTERN...]
856 List jobs that are in progress. If one or more PATTERNs are
857 specified, only jobs for units matching one of them are shown.
858
859 When combined with --after or --before the list is augmented with
860 information on which other job each job is waiting for, and which
861 other jobs are waiting for it, see above.
862
863 cancel JOB...
864 Cancel one or more jobs specified on the command line by their
865 numeric job IDs. If no job ID is specified, cancel all pending
866 jobs.
867
868 Environment Commands
869 systemd supports an environment block that is passed to processes the
870 manager spawns. The names of the variables can contain ASCII letters,
871 digits, and the underscore character. Variable names cannot be empty or
872 start with a digit. In variable values, most characters are allowed,
873 but the whole sequence must be valid UTF-8. (Note that control
874 characters like newline (NL), tab (TAB), or the escape character (ESC),
875 are valid ASCII and thus valid UTF-8). The total length of the
876 environment block is limited to _SC_ARG_MAX value defined by
877 sysconf(3).
878
879 show-environment
880 Dump the systemd manager environment block. This is the environment
881 block that is passed to all processes the manager spawns. The
882 environment block will be dumped in straight-forward form suitable
883 for sourcing into most shells. If no special characters or
884 whitespace is present in the variable values, no escaping is
885 performed, and the assignments have the form "VARIABLE=value". If
886 whitespace or characters which have special meaning to the shell
887 are present, dollar-single-quote escaping is used, and assignments
888 have the form "VARIABLE=$'value'". This syntax is known to be
889 supported by bash(1), zsh(1), ksh(1), and busybox(1)'s ash(1), but
890 not dash(1) or fish(1).
891
892 set-environment VARIABLE=VALUE...
893 Set one or more systemd manager environment variables, as specified
894 on the command line. This command will fail if variable names and
895 values do not conform to the rules listed above.
896
897 unset-environment VARIABLE...
898 Unset one or more systemd manager environment variables. If only a
899 variable name is specified, it will be removed regardless of its
900 value. If a variable and a value are specified, the variable is
901 only removed if it has the specified value.
902
903 import-environment VARIABLE...
904 Import all, one or more environment variables set on the client
905 into the systemd manager environment block. If a list of
906 environment variable names is passed, client-side values are then
907 imported into the manager's environment block. If any names are not
908 valid environment variable names or have invalid values according
909 to the rules described above, an error is raised. If no arguments
910 are passed, the entire environment block inherited by the systemctl
911 process is imported. In this mode, any inherited invalid
912 environment variables are quietly ignored.
913
914 Importing of the full inherited environment block (calling this
915 command without any arguments) is deprecated. A shell will set
916 dozens of variables which only make sense locally and are only
917 meant for processes which are descendants of the shell. Such
918 variables in the global environment block are confusing to other
919 processes.
920
921 Manager State Commands
922 daemon-reload
923 Reload the systemd manager configuration. This will rerun all
924 generators (see systemd.generator(7)), reload all unit files, and
925 recreate the entire dependency tree. While the daemon is being
926 reloaded, all sockets systemd listens on behalf of user
927 configuration will stay accessible.
928
929 This command should not be confused with the reload command.
930
931 daemon-reexec
932 Reexecute the systemd manager. This will serialize the manager
933 state, reexecute the process and deserialize the state again. This
934 command is of little use except for debugging and package upgrades.
935 Sometimes, it might be helpful as a heavy-weight daemon-reload.
936 While the daemon is being reexecuted, all sockets systemd listening
937 on behalf of user configuration will stay accessible.
938
939 log-level [LEVEL]
940 If no argument is given, print the current log level of the
941 manager. If an optional argument LEVEL is provided, then the
942 command changes the current log level of the manager to LEVEL
943 (accepts the same values as --log-level= described in systemd(1)).
944
945 log-target [TARGET]
946 If no argument is given, print the current log target of the
947 manager. If an optional argument TARGET is provided, then the
948 command changes the current log target of the manager to TARGET
949 (accepts the same values as --log-target=, described in
950 systemd(1)).
951
952 service-watchdogs [yes|no]
953 If no argument is given, print the current state of service runtime
954 watchdogs of the manager. If an optional boolean argument is
955 provided, then globally enables or disables the service runtime
956 watchdogs (WatchdogSec=) and emergency actions (e.g. OnFailure= or
957 StartLimitAction=); see systemd.service(5). The hardware watchdog
958 is not affected by this setting.
959
960 System Commands
961 is-system-running
962 Checks whether the system is operational. This returns success
963 (exit code 0) when the system is fully up and running, specifically
964 not in startup, shutdown or maintenance mode, and with no failed
965 services. Failure is returned otherwise (exit code non-zero). In
966 addition, the current state is printed in a short string to
967 standard output, see the table below. Use --quiet to suppress this
968 output.
969
970 Use --wait to wait until the boot process is completed before
971 printing the current state and returning the appropriate error
972 status. If --wait is in use, states initializing or starting will
973 not be reported, instead the command will block until a later state
974 (such as running or degraded) is reached.
975
976 Table 2. is-system-running output
977 ┌─────────────┬─────────────────────┬───────────┐
978 │Name │ Description │ Exit Code │
979 ├─────────────┼─────────────────────┼───────────┤
980 │initializing │ Early bootup, │ > 0 │
981 │ │ before basic.target │ │
982 │ │ is reached or the │ │
983 │ │ maintenance state │ │
984 │ │ entered. │ │
985 ├─────────────┼─────────────────────┼───────────┤
986 │starting │ Late bootup, before │ > 0 │
987 │ │ the job queue │ │
988 │ │ becomes idle for │ │
989 │ │ the first time, or │ │
990 │ │ one of the rescue │ │
991 │ │ targets are │ │
992 │ │ reached. │ │
993 ├─────────────┼─────────────────────┼───────────┤
994 │running │ The system is fully │ 0 │
995 │ │ operational. │ │
996 ├─────────────┼─────────────────────┼───────────┤
997 │degraded │ The system is │ > 0 │
998 │ │ operational but one │ │
999 │ │ or more units │ │
1000 │ │ failed. │ │
1001 ├─────────────┼─────────────────────┼───────────┤
1002 │maintenance │ The rescue or │ > 0 │
1003 │ │ emergency target is │ │
1004 │ │ active. │ │
1005 ├─────────────┼─────────────────────┼───────────┤
1006 │stopping │ The manager is │ > 0 │
1007 │ │ shutting down. │ │
1008 ├─────────────┼─────────────────────┼───────────┤
1009 │offline │ The manager is not │ > 0 │
1010 │ │ running. │ │
1011 │ │ Specifically, this │ │
1012 │ │ is the operational │ │
1013 │ │ state if an │ │
1014 │ │ incompatible │ │
1015 │ │ program is running │ │
1016 │ │ as system manager │ │
1017 │ │ (PID 1). │ │
1018 ├─────────────┼─────────────────────┼───────────┤
1019 │unknown │ The operational │ > 0 │
1020 │ │ state could not be │ │
1021 │ │ determined, due to │ │
1022 │ │ lack of resources │ │
1023 │ │ or another error │ │
1024 │ │ cause. │ │
1025 └─────────────┴─────────────────────┴───────────┘
1026
1027 default
1028 Enter default mode. This is equivalent to systemctl isolate
1029 default.target. This operation is blocking by default, use
1030 --no-block to request asynchronous behavior.
1031
1032 rescue
1033 Enter rescue mode. This is equivalent to systemctl isolate
1034 rescue.target. This operation is blocking by default, use
1035 --no-block to request asynchronous behavior.
1036
1037 emergency
1038 Enter emergency mode. This is equivalent to systemctl isolate
1039 emergency.target. This operation is blocking by default, use
1040 --no-block to request asynchronous behavior.
1041
1042 halt
1043 Shut down and halt the system. This is mostly equivalent to
1044 systemctl start halt.target --job-mode=replace-irreversibly
1045 --no-block, but also prints a wall message to all users. This
1046 command is asynchronous; it will return after the halt operation is
1047 enqueued, without waiting for it to complete. Note that this
1048 operation will simply halt the OS kernel after shutting down,
1049 leaving the hardware powered on. Use systemctl poweroff for
1050 powering off the system (see below).
1051
1052 If combined with --force, shutdown of all running services is
1053 skipped, however all processes are killed and all file systems are
1054 unmounted or mounted read-only, immediately followed by the system
1055 halt. If --force is specified twice, the operation is immediately
1056 executed without terminating any processes or unmounting any file
1057 systems. This may result in data loss. Note that when --force is
1058 specified twice the halt operation is executed by systemctl itself,
1059 and the system manager is not contacted. This means the command
1060 should succeed even when the system manager has crashed.
1061
1062 poweroff
1063 Shut down and power-off the system. This is mostly equivalent to
1064 systemctl start poweroff.target --job-mode=replace-irreversibly
1065 --no-block, but also prints a wall message to all users. This
1066 command is asynchronous; it will return after the power-off
1067 operation is enqueued, without waiting for it to complete.
1068
1069 If combined with --force, shutdown of all running services is
1070 skipped, however all processes are killed and all file systems are
1071 unmounted or mounted read-only, immediately followed by the
1072 powering off. If --force is specified twice, the operation is
1073 immediately executed without terminating any processes or
1074 unmounting any file systems. This may result in data loss. Note
1075 that when --force is specified twice the power-off operation is
1076 executed by systemctl itself, and the system manager is not
1077 contacted. This means the command should succeed even when the
1078 system manager has crashed.
1079
1080 reboot
1081 Shut down and reboot the system. This is mostly equivalent to
1082 systemctl start reboot.target --job-mode=replace-irreversibly
1083 --no-block, but also prints a wall message to all users. This
1084 command is asynchronous; it will return after the reboot operation
1085 is enqueued, without waiting for it to complete.
1086
1087 If combined with --force, shutdown of all running services is
1088 skipped, however all processes are killed and all file systems are
1089 unmounted or mounted read-only, immediately followed by the reboot.
1090 If --force is specified twice, the operation is immediately
1091 executed without terminating any processes or unmounting any file
1092 systems. This may result in data loss. Note that when --force is
1093 specified twice the reboot operation is executed by systemctl
1094 itself, and the system manager is not contacted. This means the
1095 command should succeed even when the system manager has crashed.
1096
1097 If the switch --reboot-argument= is given, it will be passed as the
1098 optional argument to the reboot(2) system call.
1099
1100 kexec
1101 Shut down and reboot the system via kexec. This is equivalent to
1102 systemctl start kexec.target --job-mode=replace-irreversibly
1103 --no-block. This command is asynchronous; it will return after the
1104 reboot operation is enqueued, without waiting for it to complete.
1105
1106 If combined with --force, shutdown of all running services is
1107 skipped, however all processes are killed and all file systems are
1108 unmounted or mounted read-only, immediately followed by the reboot.
1109
1110 exit [EXIT_CODE]
1111 Ask the service manager to quit. This is only supported for user
1112 service managers (i.e. in conjunction with the --user option) or in
1113 containers and is equivalent to poweroff otherwise. This command is
1114 asynchronous; it will return after the exit operation is enqueued,
1115 without waiting for it to complete.
1116
1117 The service manager will exit with the specified exit code, if
1118 EXIT_CODE is passed.
1119
1120 switch-root ROOT [INIT]
1121 Switches to a different root directory and executes a new system
1122 manager process below it. This is intended for usage in initial RAM
1123 disks ("initrd"), and will transition from the initrd's system
1124 manager process (a.k.a. "init" process) to the main system manager
1125 process which is loaded from the actual host volume. This call
1126 takes two arguments: the directory that is to become the new root
1127 directory, and the path to the new system manager binary below it
1128 to execute as PID 1. If the latter is omitted or the empty string,
1129 a systemd binary will automatically be searched for and used as
1130 init. If the system manager path is omitted, equal to the empty
1131 string or identical to the path to the systemd binary, the state of
1132 the initrd's system manager process is passed to the main system
1133 manager, which allows later introspection of the state of the
1134 services involved in the initrd boot phase.
1135
1136 suspend
1137 Suspend the system. This will trigger activation of the special
1138 target unit suspend.target. This command is asynchronous, and will
1139 return after the suspend operation is successfully enqueued. It
1140 will not wait for the suspend/resume cycle to complete.
1141
1142 hibernate
1143 Hibernate the system. This will trigger activation of the special
1144 target unit hibernate.target. This command is asynchronous, and
1145 will return after the hibernation operation is successfully
1146 enqueued. It will not wait for the hibernate/thaw cycle to
1147 complete.
1148
1149 hybrid-sleep
1150 Hibernate and suspend the system. This will trigger activation of
1151 the special target unit hybrid-sleep.target. This command is
1152 asynchronous, and will return after the hybrid sleep operation is
1153 successfully enqueued. It will not wait for the sleep/wake-up cycle
1154 to complete.
1155
1156 suspend-then-hibernate
1157 Suspend the system and hibernate it after the delay specified in
1158 systemd-sleep.conf. This will trigger activation of the special
1159 target unit suspend-then-hibernate.target. This command is
1160 asynchronous, and will return after the hybrid sleep operation is
1161 successfully enqueued. It will not wait for the sleep/wake-up or
1162 hibernate/thaw cycle to complete.
1163
1164 Parameter Syntax
1165 Unit commands listed above take either a single unit name (designated
1166 as UNIT), or multiple unit specifications (designated as PATTERN...).
1167 In the first case, the unit name with or without a suffix must be
1168 given. If the suffix is not specified (unit name is "abbreviated"),
1169 systemctl will append a suitable suffix, ".service" by default, and a
1170 type-specific suffix in case of commands which operate only on specific
1171 unit types. For example,
1172
1173 # systemctl start sshd
1174
1175 and
1176
1177 # systemctl start sshd.service
1178
1179 are equivalent, as are
1180
1181 # systemctl isolate default
1182
1183 and
1184
1185 # systemctl isolate default.target
1186
1187 Note that (absolute) paths to device nodes are automatically converted
1188 to device unit names, and other (absolute) paths to mount unit names.
1189
1190 # systemctl status /dev/sda
1191 # systemctl status /home
1192
1193 are equivalent to:
1194
1195 # systemctl status dev-sda.device
1196 # systemctl status home.mount
1197
1198 In the second case, shell-style globs will be matched against the
1199 primary names of all units currently in memory; literal unit names,
1200 with or without a suffix, will be treated as in the first case. This
1201 means that literal unit names always refer to exactly one unit, but
1202 globs may match zero units and this is not considered an error.
1203
1204 Glob patterns use fnmatch(3), so normal shell-style globbing rules are
1205 used, and "*", "?", "[]" may be used. See glob(7) for more details. The
1206 patterns are matched against the primary names of units currently in
1207 memory, and patterns which do not match anything are silently skipped.
1208 For example:
1209
1210 # systemctl stop sshd@*.service
1211
1212 will stop all sshd@.service instances. Note that alias names of units,
1213 and units that aren't in memory are not considered for glob expansion.
1214
1215 For unit file commands, the specified UNIT should be the name of the
1216 unit file (possibly abbreviated, see above), or the absolute path to
1217 the unit file:
1218
1219 # systemctl enable foo.service
1220
1221 or
1222
1223 # systemctl link /path/to/foo.service
1224
1225
1227 The following options are understood:
1228
1229 -t, --type=
1230 The argument should be a comma-separated list of unit types such as
1231 service and socket.
1232
1233 If one of the arguments is a unit type, when listing units, limit
1234 display to certain unit types. Otherwise, units of all types will
1235 be shown.
1236
1237 As a special case, if one of the arguments is help, a list of
1238 allowed values will be printed and the program will exit.
1239
1240 --state=
1241 The argument should be a comma-separated list of unit LOAD, SUB, or
1242 ACTIVE states. When listing units, show only those in the specified
1243 states. Use --state=failed to show only failed units.
1244
1245 As a special case, if one of the arguments is help, a list of
1246 allowed values will be printed and the program will exit.
1247
1248 -p, --property=
1249 When showing unit/job/manager properties with the show command,
1250 limit display to properties specified in the argument. The argument
1251 should be a comma-separated list of property names, such as
1252 "MainPID". Unless specified, all known properties are shown. If
1253 specified more than once, all properties with the specified names
1254 are shown. Shell completion is implemented for property names.
1255
1256 For the manager itself, systemctl show will show all available
1257 properties, most of which are derived or closely match the options
1258 described in systemd-system.conf(5).
1259
1260 Properties for units vary by unit type, so showing any unit (even a
1261 non-existent one) is a way to list properties pertaining to this
1262 type. Similarly, showing any job will list properties pertaining to
1263 all jobs. Properties for units are documented in systemd.unit(5),
1264 and the pages for individual unit types systemd.service(5),
1265 systemd.socket(5), etc.
1266
1267 -P
1268 Equivalent to --value --property=, i.e. shows the value of the
1269 property without the property name or "=". Note that using -P once
1270 will also affect all properties listed with -p/--property=.
1271
1272 -a, --all
1273 When listing units with list-units, also show inactive units and
1274 units which are following other units. When showing
1275 unit/job/manager properties, show all properties regardless whether
1276 they are set or not.
1277
1278 To list all units installed in the file system, use the
1279 list-unit-files command instead.
1280
1281 When listing units with list-dependencies, recursively show
1282 dependencies of all dependent units (by default only dependencies
1283 of target units are shown).
1284
1285 When used with status, show journal messages in full, even if they
1286 include unprintable characters or are very long. By default, fields
1287 with unprintable characters are abbreviated as "blob data". (Note
1288 that the pager may escape unprintable characters again.)
1289
1290 -r, --recursive
1291 When listing units, also show units of local containers. Units of
1292 local containers will be prefixed with the container name,
1293 separated by a single colon character (":").
1294
1295 --reverse
1296 Show reverse dependencies between units with list-dependencies,
1297 i.e. follow dependencies of type WantedBy=, RequiredBy=, PartOf=,
1298 BoundBy=, instead of Wants= and similar.
1299
1300 --after
1301 With list-dependencies, show the units that are ordered before the
1302 specified unit. In other words, recursively list units following
1303 the After= dependency.
1304
1305 Note that any After= dependency is automatically mirrored to create
1306 a Before= dependency. Temporal dependencies may be specified
1307 explicitly, but are also created implicitly for units which are
1308 WantedBy= targets (see systemd.target(5)), and as a result of other
1309 directives (for example RequiresMountsFor=). Both explicitly and
1310 implicitly introduced dependencies are shown with
1311 list-dependencies.
1312
1313 When passed to the list-jobs command, for each printed job show
1314 which other jobs are waiting for it. May be combined with --before
1315 to show both the jobs waiting for each job as well as all jobs each
1316 job is waiting for.
1317
1318 --before
1319 With list-dependencies, show the units that are ordered after the
1320 specified unit. In other words, recursively list units following
1321 the Before= dependency.
1322
1323 When passed to the list-jobs command, for each printed job show
1324 which other jobs it is waiting for. May be combined with --after to
1325 show both the jobs waiting for each job as well as all jobs each
1326 job is waiting for.
1327
1328 --with-dependencies
1329 When used with status, cat, list-units, and list-unit-files, those
1330 commands print all specified units and the dependencies of those
1331 units.
1332
1333 Options --reverse, --after, --before may be used to change what
1334 types of dependencies are shown.
1335
1336 -l, --full
1337 Do not ellipsize unit names, process tree entries, journal output,
1338 or truncate unit descriptions in the output of status, list-units,
1339 list-jobs, and list-timers.
1340
1341 Also, show installation targets in the output of is-enabled.
1342
1343 --value
1344 When printing properties with show, only print the value, and skip
1345 the property name and "=". Also see option -P above.
1346
1347 --show-types
1348 When showing sockets, show the type of the socket.
1349
1350 --job-mode=
1351 When queuing a new job, this option controls how to deal with
1352 already queued jobs. It takes one of "fail", "replace",
1353 "replace-irreversibly", "isolate", "ignore-dependencies",
1354 "ignore-requirements", "flush", or "triggering". Defaults to
1355 "replace", except when the isolate command is used which implies
1356 the "isolate" job mode.
1357
1358 If "fail" is specified and a requested operation conflicts with a
1359 pending job (more specifically: causes an already pending start job
1360 to be reversed into a stop job or vice versa), cause the operation
1361 to fail.
1362
1363 If "replace" (the default) is specified, any conflicting pending
1364 job will be replaced, as necessary.
1365
1366 If "replace-irreversibly" is specified, operate like "replace", but
1367 also mark the new jobs as irreversible. This prevents future
1368 conflicting transactions from replacing these jobs (or even being
1369 enqueued while the irreversible jobs are still pending).
1370 Irreversible jobs can still be cancelled using the cancel command.
1371 This job mode should be used on any transaction which pulls in
1372 shutdown.target.
1373
1374 "isolate" is only valid for start operations and causes all other
1375 units to be stopped when the specified unit is started. This mode
1376 is always used when the isolate command is used.
1377
1378 "flush" will cause all queued jobs to be canceled when the new job
1379 is enqueued.
1380
1381 If "ignore-dependencies" is specified, then all unit dependencies
1382 are ignored for this new job and the operation is executed
1383 immediately. If passed, no required units of the unit passed will
1384 be pulled in, and no ordering dependencies will be honored. This is
1385 mostly a debugging and rescue tool for the administrator and should
1386 not be used by applications.
1387
1388 "ignore-requirements" is similar to "ignore-dependencies", but only
1389 causes the requirement dependencies to be ignored, the ordering
1390 dependencies will still be honored.
1391
1392 "triggering" may only be used with systemctl stop. In this mode,
1393 the specified unit and any active units that trigger it are
1394 stopped. See the discussion of Triggers= in systemd.unit(5) for
1395 more information about triggering units.
1396
1397 -T, --show-transaction
1398 When enqueuing a unit job (for example as effect of a systemctl
1399 start invocation or similar), show brief information about all jobs
1400 enqueued, covering both the requested job and any added because of
1401 unit dependencies. Note that the output will only include jobs
1402 immediately part of the transaction requested. It is possible that
1403 service start-up program code run as effect of the enqueued jobs
1404 might request further jobs to be pulled in. This means that
1405 completion of the listed jobs might ultimately entail more jobs
1406 than the listed ones.
1407
1408 --fail
1409 Shorthand for --job-mode=fail.
1410
1411 When used with the kill command, if no units were killed, the
1412 operation results in an error.
1413
1414 --check-inhibitors=
1415 When system shutdown or sleep state is request, this option
1416 controls how to deal with inhibitor locks. It takes one of "auto",
1417 "yes" or "no". Defaults to "auto", which will behave like "yes" for
1418 interactive invocations (i.e. from a TTY) and "no" for
1419 non-interactive invocations. "yes" will let the request respect
1420 inhibitor locks. "no" will let the request ignore inhibitor locks.
1421
1422 Applications can establish inhibitor locks to avoid that certain
1423 important operations (such as CD burning or suchlike) are
1424 interrupted by system shutdown or a sleep state. Any user may take
1425 these locks and privileged users may override these locks. If any
1426 locks are taken, shutdown and sleep state requests will normally
1427 fail (unless privileged) and a list of active locks is printed.
1428 However, if "no" is specified or "auto" is specified on a
1429 non-interactive requests, the established locks are ignored and not
1430 shown, and the operation attempted anyway, possibly requiring
1431 additional privileges. May be overridden by --force.
1432
1433 -i
1434 Shortcut for --check-inhibitors=no.
1435
1436 --dry-run
1437 Just print what would be done. Currently supported by verbs halt,
1438 poweroff, reboot, kexec, suspend, hibernate, hybrid-sleep,
1439 suspend-then-hibernate, default, rescue, emergency, and exit.
1440
1441 -q, --quiet
1442 Suppress printing of the results of various commands and also the
1443 hints about truncated log lines. This does not suppress output of
1444 commands for which the printed output is the only result (like
1445 show). Errors are always printed.
1446
1447 --no-block
1448 Do not synchronously wait for the requested operation to finish. If
1449 this is not specified, the job will be verified, enqueued and
1450 systemctl will wait until the unit's start-up is completed. By
1451 passing this argument, it is only verified and enqueued. This
1452 option may not be combined with --wait.
1453
1454 --wait
1455 Synchronously wait for started units to terminate again. This
1456 option may not be combined with --no-block. Note that this will
1457 wait forever if any given unit never terminates (by itself or by
1458 getting stopped explicitly); particularly services which use
1459 "RemainAfterExit=yes".
1460
1461 When used with is-system-running, wait until the boot process is
1462 completed before returning.
1463
1464 --user
1465 Talk to the service manager of the calling user, rather than the
1466 service manager of the system.
1467
1468 --system
1469 Talk to the service manager of the system. This is the implied
1470 default.
1471
1472 --failed
1473 List units in failed state. This is equivalent to --state=failed.
1474
1475 --no-wall
1476 Do not send wall message before halt, power-off and reboot.
1477
1478 --global
1479 When used with enable and disable, operate on the global user
1480 configuration directory, thus enabling or disabling a unit file
1481 globally for all future logins of all users.
1482
1483 --no-reload
1484 When used with enable and disable, do not implicitly reload daemon
1485 configuration after executing the changes.
1486
1487 --no-ask-password
1488 When used with start and related commands, disables asking for
1489 passwords. Background services may require input of a password or
1490 passphrase string, for example to unlock system hard disks or
1491 cryptographic certificates. Unless this option is specified and the
1492 command is invoked from a terminal, systemctl will query the user
1493 on the terminal for the necessary secrets. Use this option to
1494 switch this behavior off. In this case, the password must be
1495 supplied by some other means (for example graphical password
1496 agents) or the service might fail. This also disables querying the
1497 user for authentication for privileged operations.
1498
1499 --kill-who=
1500 When used with kill, choose which processes to send a signal to.
1501 Must be one of main, control or all to select whether to kill only
1502 the main process, the control process or all processes of the unit.
1503 The main process of the unit is the one that defines the life-time
1504 of it. A control process of a unit is one that is invoked by the
1505 manager to induce state changes of it. For example, all processes
1506 started due to the ExecStartPre=, ExecStop= or ExecReload= settings
1507 of service units are control processes. Note that there is only one
1508 control process per unit at a time, as only one state change is
1509 executed at a time. For services of type Type=forking, the initial
1510 process started by the manager for ExecStart= is a control process,
1511 while the process ultimately forked off by that one is then
1512 considered the main process of the unit (if it can be determined).
1513 This is different for service units of other types, where the
1514 process forked off by the manager for ExecStart= is always the main
1515 process itself. A service unit consists of zero or one main
1516 process, zero or one control process plus any number of additional
1517 processes. Not all unit types manage processes of these types
1518 however. For example, for mount units, control processes are
1519 defined (which are the invocations of /usr/bin/mount and
1520 /usr/bin/umount), but no main process is defined. If omitted,
1521 defaults to all.
1522
1523 -s, --signal=
1524 When used with kill, choose which signal to send to selected
1525 processes. Must be one of the well-known signal specifiers such as
1526 SIGTERM, SIGINT or SIGSTOP. If omitted, defaults to SIGTERM.
1527
1528 The special value "help" will list the known values and the program
1529 will exit immediately, and the special value "list" will list known
1530 values along with the numerical signal numbers and the program will
1531 exit immediately.
1532
1533 --what=
1534 Select what type of per-unit resources to remove when the clean
1535 command is invoked, see below. Takes one of configuration, state,
1536 cache, logs, runtime to select the type of resource. This option
1537 may be specified more than once, in which case all specified
1538 resource types are removed. Also accepts the special value all as a
1539 shortcut for specifying all five resource types. If this option is
1540 not specified defaults to the combination of cache and runtime,
1541 i.e. the two kinds of resources that are generally considered to be
1542 redundant and can be reconstructed on next invocation.
1543
1544 -f, --force
1545 When used with enable, overwrite any existing conflicting symlinks.
1546
1547 When used with edit, create all of the specified units which do not
1548 already exist.
1549
1550 When used with halt, poweroff, reboot or kexec, execute the
1551 selected operation without shutting down all units. However, all
1552 processes will be killed forcibly and all file systems are
1553 unmounted or remounted read-only. This is hence a drastic but
1554 relatively safe option to request an immediate reboot. If --force
1555 is specified twice for these operations (with the exception of
1556 kexec), they will be executed immediately, without terminating any
1557 processes or unmounting any file systems. Warning: specifying
1558 --force twice with any of these operations might result in data
1559 loss. Note that when --force is specified twice the selected
1560 operation is executed by systemctl itself, and the system manager
1561 is not contacted. This means the command should succeed even when
1562 the system manager has crashed.
1563
1564 --message=
1565 When used with halt, poweroff or reboot, set a short message
1566 explaining the reason for the operation. The message will be logged
1567 together with the default shutdown message.
1568
1569 --now
1570 When used with enable, the units will also be started. When used
1571 with disable or mask, the units will also be stopped. The start or
1572 stop operation is only carried out when the respective enable or
1573 disable operation has been successful.
1574
1575 --root=
1576 When used with enable/disable/is-enabled (and related commands),
1577 use the specified root path when looking for unit files. If this
1578 option is present, systemctl will operate on the file system
1579 directly, instead of communicating with the systemd daemon to carry
1580 out changes.
1581
1582 --runtime
1583 When used with enable, disable, edit, (and related commands), make
1584 changes only temporarily, so that they are lost on the next reboot.
1585 This will have the effect that changes are not made in
1586 subdirectories of /etc/ but in /run/, with identical immediate
1587 effects, however, since the latter is lost on reboot, the changes
1588 are lost too.
1589
1590 Similarly, when used with set-property, make changes only
1591 temporarily, so that they are lost on the next reboot.
1592
1593 --preset-mode=
1594 Takes one of "full" (the default), "enable-only", "disable-only".
1595 When used with the preset or preset-all commands, controls whether
1596 units shall be disabled and enabled according to the preset rules,
1597 or only enabled, or only disabled.
1598
1599 -n, --lines=
1600 When used with status, controls the number of journal lines to
1601 show, counting from the most recent ones. Takes a positive integer
1602 argument, or 0 to disable journal output. Defaults to 10.
1603
1604 -o, --output=
1605 When used with status, controls the formatting of the journal
1606 entries that are shown. For the available choices, see
1607 journalctl(1). Defaults to "short".
1608
1609 --firmware-setup
1610 When used with the reboot command, indicate to the system's
1611 firmware to reboot into the firmware setup interface. Note that
1612 this functionality is not available on all systems.
1613
1614 --boot-loader-menu=
1615 When used with the reboot command, indicate to the system's boot
1616 loader to show the boot loader menu on the following boot. Takes a
1617 time value as parameter — indicating the menu timeout. Pass zero in
1618 order to disable the menu timeout. Note that not all boot loaders
1619 support this functionality.
1620
1621 --boot-loader-entry=
1622 When used with the reboot command, indicate to the system's boot
1623 loader to boot into a specific boot loader entry on the following
1624 boot. Takes a boot loader entry identifier as argument, or "help"
1625 in order to list available entries. Note that not all boot loaders
1626 support this functionality.
1627
1628 --reboot-argument=
1629 This switch is used with reboot. The value is architecture and
1630 firmware specific. As an example, "recovery" might be used to
1631 trigger system recovery, and "fota" might be used to trigger a
1632 “firmware over the air” update.
1633
1634 --plain
1635 When used with list-dependencies, list-units or list-machines, the
1636 output is printed as a list instead of a tree, and the bullet
1637 circles are omitted.
1638
1639 --timestamp=
1640 Change the format of printed timestamps. The following values may
1641 be used:
1642
1643 pretty (this is the default)
1644 "Day YYYY-MM-DD HH:MM:SS TZ"
1645
1646 us, µs
1647 "Day YYYY-MM-DD HH:MM:SS.UUUUUU TZ"
1648
1649 utc
1650 "Day YYYY-MM-DD HH:MM:SS UTC"
1651
1652 us+utc, µs+utc
1653 "Day YYYY-MM-DD HH:MM:SS.UUUUUU UTC"
1654
1655 --mkdir
1656 When used with bind, creates the destination file or directory
1657 before applying the bind mount. Note that even though the name of
1658 this option suggests that it is suitable only for directories, this
1659 option also creates the destination file node to mount over if the
1660 object to mount is not a directory, but a regular file, device
1661 node, socket or FIFO.
1662
1663 --marked
1664 Only allowed with reload-or-restart. Enqueues restart jobs for all
1665 units that have the "needs-restart" mark, and reload jobs for units
1666 that have the "needs-reload" mark. When a unit marked for reload
1667 does not support reload, restart will be queued. Those properties
1668 can be set using set-property Marks.
1669
1670 Unless --no-block is used, systemctl will wait for the queued jobs
1671 to finish.
1672
1673 --read-only
1674 When used with bind, creates a read-only bind mount.
1675
1676 -H, --host=
1677 Execute the operation remotely. Specify a hostname, or a username
1678 and hostname separated by "@", to connect to. The hostname may
1679 optionally be suffixed by a port ssh is listening on, separated by
1680 ":", and then a container name, separated by "/", which connects
1681 directly to a specific container on the specified host. This will
1682 use SSH to talk to the remote machine manager instance. Container
1683 names may be enumerated with machinectl -H HOST. Put IPv6 addresses
1684 in brackets.
1685
1686 -M, --machine=
1687 Execute operation on a local container. Specify a container name to
1688 connect to, optionally prefixed by a user name to connect as and a
1689 separating "@" character. If the special string ".host" is used in
1690 place of the container name, a connection to the local system is
1691 made (which is useful to connect to a specific user's user bus:
1692 "--user --machine=lennart@.host"). If the "@" syntax is not used,
1693 the connection is made as root user. If the "@" syntax is used
1694 either the left hand side or the right hand side may be omitted
1695 (but not both) in which case the local user name and ".host" are
1696 implied.
1697
1698 --no-pager
1699 Do not pipe output into a pager.
1700
1701 --legend=BOOL
1702 Enable or disable printing of the legend, i.e. column headers and
1703 the footer with hints. The legend is printed by default, unless
1704 disabled with --quiet or similar.
1705
1706 -h, --help
1707 Print a short help text and exit.
1708
1709 --version
1710 Print a short version string and exit.
1711
1713 On success, 0 is returned, a non-zero failure code otherwise.
1714
1715 systemctl uses the return codes defined by LSB, as defined in LSB
1716 3.0.0[1].
1717
1718 Table 3. LSB return codes
1719 ┌──────┬─────────────────────┬─────────────────────┐
1720 │Value │ Description in LSB │ Use in systemd │
1721 ├──────┼─────────────────────┼─────────────────────┤
1722 │0 │ "program is running │ unit is active │
1723 │ │ or service is OK" │ │
1724 ├──────┼─────────────────────┼─────────────────────┤
1725 │1 │ "program is dead │ unit not failed │
1726 │ │ and /var/run pid │ (used by is-failed) │
1727 │ │ file exists" │ │
1728 ├──────┼─────────────────────┼─────────────────────┤
1729 │2 │ "program is dead │ unused │
1730 │ │ and /var/lock lock │ │
1731 │ │ file exists" │ │
1732 ├──────┼─────────────────────┼─────────────────────┤
1733 │3 │ "program is not │ unit is not active │
1734 │ │ running" │ │
1735 ├──────┼─────────────────────┼─────────────────────┤
1736 │4 │ "program or service │ no such unit │
1737 │ │ status is unknown" │ │
1738 └──────┴─────────────────────┴─────────────────────┘
1739
1740 The mapping of LSB service states to systemd unit states is imperfect,
1741 so it is better to not rely on those return values but to look for
1742 specific unit states and substates instead.
1743
1745 $SYSTEMD_EDITOR
1746 Editor to use when editing units; overrides $EDITOR and $VISUAL. If
1747 neither $SYSTEMD_EDITOR nor $EDITOR nor $VISUAL are present or if
1748 it is set to an empty string or if their execution failed,
1749 systemctl will try to execute well known editors in this order:
1750 editor(1), nano(1), vim(1), vi(1).
1751
1752 $SYSTEMD_LOG_LEVEL
1753 The maximum log level of emitted messages (messages with a higher
1754 log level, i.e. less important ones, will be suppressed). Either
1755 one of (in order of decreasing importance) emerg, alert, crit, err,
1756 warning, notice, info, debug, or an integer in the range 0...7. See
1757 syslog(3) for more information.
1758
1759 $SYSTEMD_LOG_COLOR
1760 A boolean. If true, messages written to the tty will be colored
1761 according to priority.
1762
1763 This setting is only useful when messages are written directly to
1764 the terminal, because journalctl(1) and other tools that display
1765 logs will color messages based on the log level on their own.
1766
1767 $SYSTEMD_LOG_TIME
1768 A boolean. If true, console log messages will be prefixed with a
1769 timestamp.
1770
1771 This setting is only useful when messages are written directly to
1772 the terminal or a file, because journalctl(1) and other tools that
1773 display logs will attach timestamps based on the entry metadata on
1774 their own.
1775
1776 $SYSTEMD_LOG_LOCATION
1777 A boolean. If true, messages will be prefixed with a filename and
1778 line number in the source code where the message originates.
1779
1780 Note that the log location is often attached as metadata to journal
1781 entries anyway. Including it directly in the message text can
1782 nevertheless be convenient when debugging programs.
1783
1784 $SYSTEMD_LOG_TARGET
1785 The destination for log messages. One of console (log to the
1786 attached tty), console-prefixed (log to the attached tty but with
1787 prefixes encoding the log level and "facility", see syslog(3), kmsg
1788 (log to the kernel circular log buffer), journal (log to the
1789 journal), journal-or-kmsg (log to the journal if available, and to
1790 kmsg otherwise), auto (determine the appropriate log target
1791 automatically, the default), null (disable log output).
1792
1793 $SYSTEMD_PAGER
1794 Pager to use when --no-pager is not given; overrides $PAGER. If
1795 neither $SYSTEMD_PAGER nor $PAGER are set, a set of well-known
1796 pager implementations are tried in turn, including less(1) and
1797 more(1), until one is found. If no pager implementation is
1798 discovered no pager is invoked. Setting this environment variable
1799 to an empty string or the value "cat" is equivalent to passing
1800 --no-pager.
1801
1802 $SYSTEMD_LESS
1803 Override the options passed to less (by default "FRSXMK").
1804
1805 Users might want to change two options in particular:
1806
1807 K
1808 This option instructs the pager to exit immediately when Ctrl+C
1809 is pressed. To allow less to handle Ctrl+C itself to switch
1810 back to the pager command prompt, unset this option.
1811
1812 If the value of $SYSTEMD_LESS does not include "K", and the
1813 pager that is invoked is less, Ctrl+C will be ignored by the
1814 executable, and needs to be handled by the pager.
1815
1816 X
1817 This option instructs the pager to not send termcap
1818 initialization and deinitialization strings to the terminal. It
1819 is set by default to allow command output to remain visible in
1820 the terminal even after the pager exits. Nevertheless, this
1821 prevents some pager functionality from working, in particular
1822 paged output cannot be scrolled with the mouse.
1823
1824 See less(1) for more discussion.
1825
1826 $SYSTEMD_LESSCHARSET
1827 Override the charset passed to less (by default "utf-8", if the
1828 invoking terminal is determined to be UTF-8 compatible).
1829
1830 $SYSTEMD_PAGERSECURE
1831 Takes a boolean argument. When true, the "secure" mode of the pager
1832 is enabled; if false, disabled. If $SYSTEMD_PAGERSECURE is not set
1833 at all, secure mode is enabled if the effective UID is not the same
1834 as the owner of the login session, see geteuid(2) and
1835 sd_pid_get_owner_uid(3). In secure mode, LESSSECURE=1 will be set
1836 when invoking the pager, and the pager shall disable commands that
1837 open or create new files or start new subprocesses. When
1838 $SYSTEMD_PAGERSECURE is not set at all, pagers which are not known
1839 to implement secure mode will not be used. (Currently only less(1)
1840 implements secure mode.)
1841
1842 Note: when commands are invoked with elevated privileges, for
1843 example under sudo(8) or pkexec(1), care must be taken to ensure
1844 that unintended interactive features are not enabled. "Secure" mode
1845 for the pager may be enabled automatically as describe above.
1846 Setting SYSTEMD_PAGERSECURE=0 or not removing it from the inherited
1847 environment allows the user to invoke arbitrary commands. Note that
1848 if the $SYSTEMD_PAGER or $PAGER variables are to be honoured,
1849 $SYSTEMD_PAGERSECURE must be set too. It might be reasonable to
1850 completely disable the pager using --no-pager instead.
1851
1852 $SYSTEMD_COLORS
1853 Takes a boolean argument. When true, systemd and related utilities
1854 will use colors in their output, otherwise the output will be
1855 monochrome. Additionally, the variable can take one of the
1856 following special values: "16", "256" to restrict the use of colors
1857 to the base 16 or 256 ANSI colors, respectively. This can be
1858 specified to override the automatic decision based on $TERM and
1859 what the console is connected to.
1860
1861 $SYSTEMD_URLIFY
1862 The value must be a boolean. Controls whether clickable links
1863 should be generated in the output for terminal emulators supporting
1864 this. This can be specified to override the decision that systemd
1865 makes based on $TERM and other conditions.
1866
1868 systemd(1), journalctl(1), loginctl(1), machinectl(1), systemd.unit(5),
1869 systemd.resource-control(5), systemd.special(7), wall(1),
1870 systemd.preset(5), systemd.generator(7), glob(7)
1871
1873 1. LSB 3.0.0
1874 http://refspecs.linuxbase.org/LSB_3.0.0/LSB-PDA/LSB-PDA/iniscrptact.html
1875
1876
1877
1878systemd 249 SYSTEMCTL(1)