SERVICE STATUS
Task Command
Check if a service is
sudo systemctl status <service>
running
Check if service is enabled systemctl is-enabled <service>
View logs for a service journalctl -u <service>
START / STOP / RESTART
Task Command
Start a service sudo systemctl start <service>
Stop a service sudo systemctl stop <service>
Restart a service sudo systemctl restart <service>
Reload config (no restart) sudo systemctl reload <service>
ENABLE / DISABLE
Task Command
Enable at boot sudo systemctl enable <service>
sudo systemctl disable
Disable at boot
<service>
sudo systemctl reenable
Re-enable after changes
<service>
CLEANUP & TROUBLESHOOTING
Task Command
Show all failed services systemctl --failed
Reset failed services sudo systemctl reset-failed
systemctl list-units --
List all active services
type=service
Examples
Check status of nginx:
sudo systemctl status nginx
Start Docker and enable it at boot:
sudo systemctl start docker
sudo systemctl enable docker
Restart SSH:
sudo systemctl restart ssh
View recent logs from mysql:
journalctl -u mysql