systemctl Cheat Sheet
Manage systemd services, units, targets, and boot state from the command line.
Troubleshooting4 sections · 28 commands
⌘K
Units
6systemctl list-units --type=serviceAll loaded service units
systemctl cat nginxShow the unit definition and drop-ins
systemctl show nginx -p MainPIDRead one property of a unit
systemctl edit nginxEdit a unit's drop-in override
systemctl daemon-reloadReload unit files after edits
systemctl list-unit-files | grep enabledUnits enabled at boot
Service Control
12systemctl start SERVICEStart a service
systemctl stop SERVICEStop a service
systemctl restart SERVICERestart a service
systemctl reload SERVICEReload config without downtime
systemctl status SERVICEService state, PID, recent logs
systemctl is-active SERVICEPrint activate/failed/inactive
systemctl is-enabled SERVICEIs it enabled at boot
systemctl enable SERVICEStart at boot
systemctl disable SERVICEDo not start at boot
systemctl enable --now SERVICEEnable and start in one step
systemctl mask SERVICEBlock a service entirely
systemctl kill -s SIGKILL SERVICESend a raw signal to the unit
Boot & Targets
7systemctl get-defaultCurrent default target
systemctl set-default multi-user.targetBoot to text mode
systemctl isolate rescue.targetSwitch to maintenance mode
systemctl rebootReboot the host
systemctl poweroffShut down the host
systemctl suspendSuspend to RAM
systemctl list-socketsSocket-activated units
Timers
3systemctl list-timersAll timers and next runs
systemctl start fstrim.timerActivate a timer now
systemctl list-timers --allInclude inactive timers