systemctl is-failed
linux
Check if one or more systemd units have failed. See also: `systemctl is-active`, `systemctl status`.
More info →Options (1)
-q, --quietbooleanSuppress output and return only the exit code
Example:
systemctl is-failed {{unit}} {{[-q|--quiet]}}Examples (4)
Check if there are any failed units
Check if a unit or multiple units have failed
systemctl is-failed unit1 unit2 ...Suppress output and return only the exit code
systemctl is-failed unit [-q|--quiet]Check if a user unit has failed
systemctl is-failed unit --usermade by @shridhargupta | data from tldr-pages