linux see battery state code example Example: linux see battery state upower -i $(upower -e | grep 'BAT') | grep -E "state|to\ full|percentage"