How to check laptop battery status with the Linux command-line.
Posted: October 15, 2012. At: 1:02 PM. This was 4 years ago. Post ID: 4717
To check the battery status of your Linux laptop; use the acpi command. This will display the status of your laptop battery.
[email protected] ~$ acpi Battery 0: Disharging, 40%, 00:48:32 remaining.
This command also has many other options. This one shows the CPU temperature.
[email protected] ~$ acpi -t Thermal 0: ok, 45.0 degrees C
And this one shows the status of the cooling in your machine.
[email protected] ~$ acpi -c Cooling 0: LCD 3 of 15 Cooling 1: Processor 0 of 10
These examples are used on an ASUS eePC running Linux Mint 12 Debian edition. Here is the full help page for this utility. Type sudo apt-get install acpi to install this little app.
[email protected] ~$ acpi --help Usage: acpi [OPTION]... Shows information from the /proc filesystem, such as battery status or thermal information. -b, --battery battery information -i, --details show additional details if available: - battery capacity information - temperature trip points -a, --ac-adapter ac adapter information -t, --thermal thermal information -c, --cooling cooling information -V, --everything show every device, overrides above options -s, --show-empty show non-operational devices -f, --fahrenheit use fahrenheit as the temperature unit -k, --kelvin use kelvin as the temperature unit -d, --directory
path to ACPI info (/sys/class resp. /proc/acpi) -p, --proc use old proc interface instead of new sys interface -h, --help display this help and exit -v, --version output version information and exit By default, acpi displays information on installed system batteries. Non-operational devices, for example empty battery slots are hidden. The default unit of temperature is degrees celsius. Report bugs to Michael Meskes .
As you can see; this is obviously a very useful application.