Forever & AlwaysLINUX COMMAND ATLAS

LINUX COMMAND ATLAS · COMMAND GUIDE

Linux systemctl command

Inspect or manage systemd services. Service names vary by distribution.

systemd

Syntax

Command form
systemctl [OPTIONS...] COMMAND [UNIT...]

Common options

7 options
OptionWhat it does
status UNITShow a unit's state and recent log lines.
start UNIT / stop UNITStart or stop a unit now.
restart UNIT / reload UNITRestart a unit or ask it to reload its configuration.
enable UNIT / disable UNITConfigure whether a unit starts at boot.
--nowWith enable/disable, also start/stop the unit immediately.
--userManage the calling user's service manager.
list-units --type=TYPEFilter the list by unit type.

Usage examples

2 examples

Inspect or manage systemd services. Service names vary by distribution.

systemctl status ssh

List currently running service units.

systemctl list-units --type=service --state=running

Notes

Changing system services usually needs administrator privileges. Unit names and service managers vary by distribution; inspect status before changing state.