systemctl-is-active
Check if one or more systemd units are active. tldr-pages
On Linux
Linux
Check whether a unit is active
systemctl is-active unitIdentifyCheck whether multiple units are active
systemctl is-active unit1 unit2 ...IdentifyCheck whether a unit is active without printing the state to stdout
systemctl is-active unit --quietIdentifyCheck whether a user unit is active
systemctl is-active unit --userIdentify