Quick, practical ways to read laptop battery status from the Linux command line. 16.11.2025 | reading time: 2 min On a Linux laptop the system exposes battery state through userland tools and kernel sysfs; this short guide shows how to read remaining charge, health and status, and gives commands you can run immediately to inspect a battery. Practical check on a laptop Run the commands below to discover device paths and a readable summary with `upower`, then fall back to sysfs for raw numbers; example session: ```$ upower -e /org/freedesktop/UPower/devices/battery_BAT0 $ upower -i /org/freedesktop/UPower/devices/battery_BAT0 native-path: BAT0 vendor: SANYO model: 1234 power supply: yes updated: Tue 14 Oct 12:34:56 2025 has history: yes has statistics: yes battery state: discharging percentage: 73% time to empty: 2.3 hours ``` If `upower` is not installed use `cat /sys/class/power_supply/BAT0/capacity` and `cat /sys/class/power_supply/BAT0/status` for immediate answers. Read raw numbers and compute capacity Inspect kernel exports for precise values, for example `cat /sys/class/power_supply/BAT0/energy_now`, `cat /sys/class/power_supply/BAT0/energy_full` and `cat /sys/class/power_supply/BAT0/voltage_now`; compute percent as `(energy_now * 100) / energy_full` and note that some batteries use "charge_*" instead of "energy_*", so check which files are present before calculating. Diagnose health and cycles Check `cycle_count` and `energy_full_design` (or `charge_full_design`) in `/sys/class/power_supply/BAT0` to estimate wear: real_capacity = `energy_full / energy_full_design * 100` reports how much of the original capacity remains, and `upower -i` or `tlp-stat -b` will often summarize cycle count and design versus current capacities. Other helpful programs Tools to complement the above include `acpi -V` for concise status and temperature reports, `powertop` to find power hogs and estimate runtime, and `tlp` for configuring advanced battery saving and reading additional statistics; use the tool that fits the task and keep root privileges in mind for some files. Final checkpoint You now have commands to list battery devices, read human-friendly summaries and inspect raw kernel values for accurate calculations; apply these checks to troubleshoot short runtimes or to verify reported health, and continue exploring deeper monitoring and automation. Join Bits & Bytes Academy First class LINUX exam preparation. utilities troubleshooting processes