snippetbashTip
systemd-ac-power — Report whether the computer is connected to an external power source. More information: <https://www
Viewed 0 times
thecomputerconnectedcommandreportwhetherclisystemd-ac-power
linux
Problem
How to use the
systemd-ac-power command: Report whether the computer is connected to an external power source. More information: <https://www.freedesktop.org/software/systemd/man/latest/systemd-ac-power.html>.Solution
systemd-ac-power — Report whether the computer is connected to an external power source. More information: <https://www.freedesktop.org/software/systemd/man/latest/systemd-ac-power.html>.Silently check and return a 0 status code when running on AC power, and a non-zero code otherwise:
systemd-ac-powerAdditionally print
yes or no to stdout:systemd-ac-power {{[-v|--verbose]}}Code Snippets
Silently check and return a 0 status code when running on AC power, and a non-zero code otherwise
systemd-ac-powerAdditionally print `yes` or `no` to `stdout`
systemd-ac-power {{[-v|--verbose]}}Context
tldr-pages: linux/systemd-ac-power
Revisions (0)
No revisions yet.