HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

systemctl is-active — Check if one or more systemd units are active. More information: <https://www.freedesktop.org/softwa

Submitted by: @import:tldr-pages··
0
Viewed 0 times
systemdunitscommandclicheckmoreonesystemctl is-active
linux

Problem

How to use the systemctl is-active command: Check if one or more systemd units are active. More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#is-active%20PATTERN%E2%80%A6>.

Solution

systemctl is-active — Check if one or more systemd units are active. More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#is-active%20PATTERN%E2%80%A6>.

Check whether a unit is active:
systemctl is-active {{unit}}


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:
systemctl is-active {{unit}} --user

Code Snippets

Check whether a unit is active

systemctl is-active {{unit}}

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

systemctl is-active {{unit}} --user

Context

tldr-pages: linux/systemctl is-active

Revisions (0)

No revisions yet.