systemd and journalctl · Managing services
Test if a service is running
Print active or inactive; the exit code suits scripts.
systemctl is-active nginx
Official systemd and journalctl documentation
More managing services commands
- Check a service
- Start a service
- Stop a service
- Restart a service
- Reload a service's configuration
- Start a service now and at boot
All managing services commands · systemd and journalctl cheatsheet