Posted: . At: 1:02 PM. This was 12 years ago. Post ID: 4717
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.

How to check laptop battery status with the Linux command-line.

To check the battery status of your Linux laptop; use the acpi command. This will display the status of your laptop battery.

exempli gratia.

John@3.2.0-2-486 ~$ acpi
Battery 0: Disharging, 40%, 00:48:32 remaining.

This command also has many other options. This one shows the CPU temperature.

John@3.2.0-2-486 ~$ acpi -t
Thermal 0: ok, 45.0 degrees C

And this one shows the status of the cooling in your machine.

John@3.2.0-2-486 ~$ 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.

John@3.2.0-2-486 ~$ 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 <dir>    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 <meskes@debian.org>.

As you can see; this is obviously a very useful application.

1 thought on “How to check laptop battery status with the Linux command-line.”

  1. Handy. A bit disappointing when a “new” battery comes up less than design capacity, but handy to watch the eventual degradation. Cheers.

    Reply

Leave a Reply to Ken Jones Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.