Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save kurtis318/75cd534e650b5ac50683b06d5d23e578 to your computer and use it in GitHub Desktop.

Select an option

Save kurtis318/75cd534e650b5ac50683b06d5d23e578 to your computer and use it in GitHub Desktop.
Command line tools to show battery status

Issue:

I always have to do a Goggle search when I need a command I can run to see my battery status.

Solution:

Here are a few I have found.

REF: https://askubuntu.com/questions/69556/how-to-check-battery-status-using-terminal

[kurtis@asus-Q302LA .ssh] $ upower -i /org/freedesktop/UPower/devices/battery_BAT0
  native-path:          BAT0
  vendor:               ASUSTeK
  model:                UX3-44
  power supply:         yes
  updated:              Tue 29 Jan 2019 09:12:21 PM CST (53 seconds ago)
  has history:          yes
  has statistics:       yes
  battery
    present:             yes
    rechargeable:        yes
    state:               discharging
    warning-level:       none
    energy:              37.209 Wh
    energy-empty:        0 Wh
    energy-full:         49.761 Wh
    energy-full-design:  52.953 Wh
    energy-rate:         9.519 W
    voltage:             11.4 V
    time to empty:       3.9 hours
    percentage:          74%
    capacity:            93.972%
    technology:          lithium-ion
    icon-name:          'battery-full-symbolic'
  History (charge):
    1548817941	74.000	discharging
  History (rate):
    1548817941	9.519	discharging


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment