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

All managing services commands · systemd and journalctl cheatsheet

Was this page helpful?