systemctl
Control the systemd system and service manager daemons.
Common Options & Flags
| Option / Flag | Description |
|---|---|
| status | Show runtime status of service |
| start / stop / restart | Start, stop, or restart a service |
| enable / disable | Enable or disable service auto-start at boot |
| daemon-reload | Reload systemd manager configuration |
Practical Command Examples
Check if Nginx web server is running and view recent logs.
Restart Docker daemon service.
Enable firewall auto-boot and start immediately.
Production Real-World Use Case
Managing web server, database, and background worker daemons on Linux production servers.
Common Mistakes
- ✕Forgetting systemctl daemon-reload after editing unit files in /etc/systemd/system/.
Security Considerations
Audit enabled boot services with systemctl list-unit-files --state=enabled to eliminate unnecessary attack surfaces.