CentOS 7.x check laptop battery information
From Notes_Wiki
<yambe:breadcrumb>CentOS_7.x_laptop_battery|CentOS 7.x laptop battery</yambe:breadcrumb>
CentOS 7.x check laptop battery information
To check laptop battery related information use:
upower -i /org/freedesktop/UPower/devices/battery_BAT0
To get laptop battery information via alias create '/etc/profile.d/bat.sh' with
#!/bin/bash alias bat='upower -i /org/freedesktop/UPower/devices/battery_BAT0| grep -E "state|to\ full|percentage"'
Then use:
chmod +x /etc/profile.d/bat.sh
to make the profile configuration script executable. Then to check battery information simply use:
bat
after starting a new shell.
Refer: