Table of Contents
Today, in this article, we show how to Check Linux Laptop Battery using command line. It’s simple to check the battery status using the GUI. The battery level can be seen by moving the mouse over the battery indicator on the laptop taskbar. But did you know that the Linux command line can also be used to check battery status? Yes, Linux has some tools that can be useful in this regard.
Well, as long as your battery laptop it’s still good. When not plugged into an AC adapter, your laptop’s battery serves as its only source of power. Your computer will not be able to run internal hard drives, connect to Wi-Fi, power the screen, or read user input if the battery is not powerful enough. There is disagreement among manufacturers as to the benefits and disadvantages of leaving a laptop on all the time. Your laptop it will often not be fully charged when you take it out if you decide not to.
It’s simple to check the status of your laptop battery in GUI mode. The battery level can be easily seen by moving the mouse pointer over the task symbol/top bar to the battery indicator. Consider using the command line even if no one knows how to do it. I was inspired to write this article when a friend of mine recently asked how to use Terminal on your Ubuntu desktop to check the battery level on your laptop. We mentioned below are the steps to verify Linux Laptop Battery using command line.
Steps to Verify Linux Laptop Battery using command line
Arch Linux AUR
Step 1: If you are an Arch Linux user, you can install Battop from the Arch Linux user repository. To start the installation process, install the “git” and “base-devel” packages using pacman –s command.
SUDO PACMAN -S GIT BASE-DEVEL
Step 2: With both packages defined up, you will need to use the git clone command to download the latest version of Trizen. The Trizen app will do the configuration up battop easier in your Linux PC so you don’t have to do it manually.
GIT CLONE HTTPS://AUR.ARCHLINUX.ORG/TRIZEN.GIT
Step 3: After downloading the trizen release package for your Arch Linux system, use cd command to move to “trinize” folder. This folder has all the Trizen AUR installation files.
CD TRIZEN/
Step 4: Once inside the “trinize” folder, use the makepkg command to install Trizen Software on your linux computer.
MAKEPKG-SRI
Step 5: With the Trizen up application suite, you can use the trizen -S command to install the battop application.
BATOP TRIZEN-S
from the source
Step 1: Once you have both git and rust set upuse git clone command to download the software to your computer.
GIT CLONE HTTPS://GITHUB.COM/SVARTALF/RUST-BATTOP.GIT
Step 2: After downloading the Software to your computer, use the cd command to move to “battop-rust” folder on your computer.
CD RUST-BATTOP
Step 3: Finally, compile the Software on your system using the charge command.
CARGO CONSTRUCTION – RELEASE
Binary
Step 1: There is a precompiled binary Battop available at “releases” page. This binary is best to use if you can’t get the AUR or compiled version of battop Working.
WGET HTTPS://GITHUB.COM/SVARTALF/RUST-BATTOP/RELEASES/DOWNLOAD/V0.2.4/BATTOP-V0.2.4-X86_64-UNKNOWN-LINUX-GNU -O BATTOP
Step 2: After downloading the software to your computer, install it in the /usr/bin/ directory.
SUDO MV BATTOP /USR/BIN/
Step 3: update the permissions from the file with the chmod command.
SUDO CHMOD +X /USR/BIN/BATTOP
check your laptop battery with Battop
Step 1: using the terminal windowrun the sudo -s command. This command will allow you to get a root shell. A root shell is essential as it will allow the Battop app to access all system-level hardware.
SUDO-S
Step 2: After getting root access, you can run the coat command to start monitoring your battery. The default operation for the Battery Top app is human readable numbers. If you want to change these numbers, you can run battop -u si.
BATTLE
or BATTOP -U SI
Step 3: Allow Battop subscription to run for a while. By doing so, it will start to fill graphics about the health of your battery. After letting it sit for a while, maximize the terminal to fit the entire screen of your Linux PC.
Step 4: After selecting the “Maximize” button with the mouse, the terminal window will fill the entire screen. Now find the print screen button at the keyboard and select it to take a print Screen your battery information.
Step 5: When selecting the print screen button with the mouse, the screen capture application on the Linux desktop will save an image of the desktop. Save this Image for your records, so you can regularly view your drums health.
Final Words
We hope you like our article on how to Check Linux Laptop Command line battery. A user interface that is navigated by typing commands at prompts instead of using a mouse is known as a command line, also known as a Windows command line, command screen, or text interface.
While using a command-line interface requires learning several commands, it can be a useful tool and should not be overlooked. Almost every task that can be done with a GUI can be done using the command line. However, many activities can be completed faster and easier with automation and remote work.