mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-31 14:42:00 +00:00
18 lines
479 B
Plaintext
18 lines
479 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, linux]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# systemd-ac-power
|
|
|
|
> Report whether the computer is connected to an external power source.
|
|
> More information: <https://www.freedesktop.org/software/systemd/man/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-power`
|
|
|
|
- Additionally print `yes` or `no` to `stdout`:
|
|
|
|
`systemd-ac-power --verbose`
|