I would like a command that check the battery status through the terminal
"acpi" does not work for 11.10.
The below command outputs a lot status and statistical information about the battery.
You could use tools like grep to get just the information you want from all that output.
One simple way: piping the above command into
If you find yourself wanting to run that regularly, you could make a bash alias for the whole thing, like:
Add that to the end of your .bashrc file, and you can type 'bat' any time, in the terminal.
Maybe you can try:
I was going to suggest
Please type this in your terminal:
If you get a "file or directory not found" then this isn't going to work.
But, if it lists files, then here's a script [paste it into /usr/games/ or other directory in $PATH, and run
(Note, if not already installed, install the program
I have tested this script on my laptop. I say estimate above because
**In my lenovo, the battery is listed as BAT1, try that too. (12.04 LTS)
or you can use this command as suggested by iceburn :