使用upower查看电池信息
刚买了新本,发现电池亏损6%,不知道是临时的还是永久的,为了经常能查询到电池信息而使用这个命令。
使用命令:upower -i `upower -e | grep 'BAT'`
$ upower -i `upower -e | grep 'BAT'`
native-path: BAT0
vendor: LGC
model: AC17A8M
serial: E85D
power supply: yes
updated: 01月30日 星期三 16时35分25秒 (53 seconds ago)
has history: yes
has statistics: yes
battery
present: yes
rechargeable: yes
state: discharging
warning-level: none
energy: 55.414 Wh
energy-empty: 0 Wh
energy-full: 58.951 Wh
energy-full-design: 61.908 Wh
energy-rate: 7.392 W
voltage: 12.387 V
time to empty: 7.5 hours
percentage: 94%
capacity: 95.2236%
technology: lithium-ion
icon-name: 'battery-full-symbolic'
History (rate):
1548837325 7.392 discharging
在~/.bashrc中添加命令别名
$ sudo vim ~/.bashrc
将以下内容放在文件结尾
alias battery="upower -i `upower -e | grep 'BAT'`"
这样每次就可以方便的看电池亏损了。