Linux Laptop: Display Battery Status And Thermal Temperature From Command Line

Originally published at: https://www.cyberciti.biz/faq/linux-laptop-battery-status-temperature/

How do I find out details about my Linux Laptops temperature, battery status and other information from the command prompt? How can I check battery status using the terminal on Linux?

Use lm-sensors package. It should be already installed in most up to date Linux distros but if for some reason you don’t have it you can easily install it:
On RHEL, and ‘RHELish’ distros
sudo yum/dnf install lm_sensors
On Debian and its derivatives
sudo apt-get install lm-sensors
On SUSE
sudo zypper in sensors
On Arch
sudo pacman -S lm_sensors
After installing you need to configure it to use it:
sudo sensors-detect
Once configured it can be used by typing:
sudo sensors
More info can be found in man
man sensors