commands.sh

systemctl is-active

linux

Check if one or more systemd units are active.

More info →

Options (1)

-q, --quietboolean

Check whether a unit is active without printing the state to `stdout`

Example: systemctl is-active {{unit}} {{[-q|--quiet]}}

Examples (4)

Check whether a unit is active

Check whether multiple units are active

systemctl is-active unit1 unit2 ...

Check whether a unit is active without printing the state to `stdout`

systemctl is-active unit [-q|--quiet]

Check whether a user unit is active

made by @shridhargupta | data from tldr-pages