Systemctl: Difference between revisions
Jump to navigation
Jump to search
(→enable) |
|||
Line 47: | Line 47: | ||
{{Internal|Systemd_Concepts#Start_.28Enable.29_a_Service_Automatically_at_Boot|Enable a Service at Boot}} | {{Internal|Systemd_Concepts#Start_.28Enable.29_a_Service_Automatically_at_Boot|Enable a Service at Boot}} | ||
==disable== | |||
<syntaxhighlight lang='bash'> | |||
systemctl disable haproxy | |||
</syntaxhighlight> | |||
==start== | ==start== |
Revision as of 08:06, 7 December 2020
Internal
Overview
See
-q (quiet)
Suppress output to standard output in snapshot, is-active, is-failed, is-enabled, is-system-running, enable and disable. However, it does not suppress output to stderr, which happens when the unit in question does not exists, etc.
You may want to consider:
systemctl -q .... 2>/dev/null
Commands
list-units
Lists loaded active units.
In order to list all loaded units (active or inactive), use -a or --all:
systemctl list-units --all
is-enabled
Tells whether the service is enabled at boot.
is-active
Tells whether the service is running, or it was shut down.
status
show
Show properties of one or more units.
enable
disable
systemctl disable haproxy
start
Start (activate) one or more units.
stop
Stop (deactivate) one or more units.