Linux For Cynics One user's experiences with Linux

19Apr/130

Check your Laptop Battery Status from Command Line

The tool used to query laptop battery state is called acpi. In Ubuntu or Debian, install it like so:

$ sudo apt-get install acpi

Let's run it!

$ acpi

The output looks something like this:

Battery 0: Discharging, 99%, 02:34:33 remaining

There are various options for acpi we can use:

Check the temperature:

$ acpi -t

Output:

Thermal 0: ok, 48.0 degrees C
Thermal 1: ok, 48.0 degrees C

To check the AC power status

$ acpi -a 

Output:

AC Adapter 0: off-line

You can check all the status together:

$ acpi -V

Output:

Battery 0: Discharging, 96%, 02:33:55 remaining
Battery 0: design capacity 1773 mAh, last full capacity 1723 mAh = 97%
Adapter 0: off-line
Thermal 0: ok, 48.0 degrees C
Thermal 0: trip point 0 switches to mode critical at temperature 105.0 degrees C
Thermal 0: trip point 1 switches to mode passive at temperature 90.5 degrees C
Thermal 1: ok, 47.0 degrees C
Thermal 1: trip point 0 switches to mode critical at temperature 127.0 degrees C
Cooling 0: LCD 8 of 15
Cooling 1: Processor 0 of 10
Cooling 2: Processor 0 of 10