systemd-ac-powersystemdsystemd-ac-power1systemd-ac-powerReport whether we are connected to an external power sourcesystemd-ac-powerOPTIONSDescriptionsystemd-ac-power may be used to check whether the system
is running on AC power or not. By default it will simply return success (if we
can detect that we are running on AC power) or failure, with no output.
This can be useful for example to debug ConditionACPower= (see
systemd.unit5).OptionsThe following options are understood:Show result as text instead of just returning success or failure.Exit statusOn success (running on AC power), 0 is returned, a non-zero failure code otherwise.See Alsosystemd1