systemctl
system administrationLinux
The systemctl command is one of the most frequently used commands in Linux/Unix-like operating systems. systemctl Control the systemd system and service manager
Quick Reference
Command Name:
systemctl
Category:
system administration
Platform:
Linux
Basic Usage:
systemctl [options] [arguments]
Common Use Cases
Syntax
systemctl [options] command [name...]
Options
Option | Description |
---|---|
-t, --type= |
List units of a specific type |
--state= |
List units with specific state |
-a, --all |
Show all loaded units |
-l, --full |
Don't ellipsize unit names, process tree, etc. |
--fail |
Show failed units only |
--show-types |
Show types in list-units/list-sockets |
-i, --ignore-inhibitors |
When shutting down or sleeping, ignore inhibitors |
--no-block |
Do not wait until operation finished |
--no-wall |
Don't send wall message before halt/power-off/reboot |
--no-pager |
Do not pipe output into a pager |
--system |
Connect to system manager |
--user |
Connect to user service manager |
--now |
When enabling/disabling a unit, also start/stop it |
-q, --quiet |
Suppress output |
-p, --property= |
Show only properties specified by a list |
-H, --host= |
Operate on remote host |
-M, --machine= |
Operate on local container |
-h, --help |
Show help |
--version |
Show version |
Examples
How to Use These Examples
The examples below show common ways to use the systemctl
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
# Basic Examples Basic
# Start a service
systemctl start apache2.service