Battery information in Linux is provided by the ACPI (Advanced Configuration and Power Interface) daemon. You can view your battery information by using any of the following methods;
The easiest way to view battery information is by using the
To do that, run your favorite terminal program and execute the following command;
The following is the sample output of the command;
design voltage: 11100 mV design capacity warning: 341 mWh design capacity low: 0 mWh capacity granularity 1: 100 mWh capacity granularity 2: 0 mWh model number: Dell serial number: 866 battery type: LION OEM info: PANASONIC present: yes capacity state: ok charging state: charged present rate: 1 mW remaining capacity: 3417 mWh present voltage: 12408 mV
It displays some detailed information of your battery as provided by ACPI.
BAT0is for your first battery. If you have more than one battery, you can use
BAT1and so on.
cat /proc/acpi/battery/BAT0/*will display the content of 3 files;
/proc/acpi/battery/BAT0/state. You can view individual file's content by running
/proc/acpi/battery/BAT0/infoand so on.
acpi is a program available for linux specifically to view ACPI related information for Linux. While it doesn't provide information as detailed as the above method, it provides useful enough information for most people.
To view basic battery information, run the following command at the terminal;
and you'll get the following output'
Battery 0: Full, 100%
To get more info from the command, add the
-i option as the following;
and you'll get output as the following
Battery 0: Full, 100% Battery 0: design capacity 411 mAh, last full capacity 275 mAh = 66%
If the program is not installed in your system, run the following command at the terminal if you're using Ubuntu to install it.
sudo apt-get install acpi