bat: a handy command for ASUS laptop batteries

ASUS laptop bat

If you have a GNU / Linux distro installed on an ASUS laptop, then you should know the bat tool. A simple command that can help you easily set charge thresholds for these laptop batteries. That way, you can help extend the life of your batteries.

Linux bat command is intended to replicate utility functions ASUS Battery Health Charging, which is not available for distros, only for Windows.

For example, with bat you can easily switch between a load threshold to another, reset to another previous threshold, see the charge current being used, display the current level of battery charge or status. All this thanks to the use of systemd services (v244 or higher, so you will need a Fedora 32 distro, Ubuntu 20.04, Debian 11.0, openSUSE Leap 15.3, etc., or higher). Bash and Linux kernel 5.4 or higher are also required, as it would not work with some ASUS laptops otherwise.

For its installation, you can follow these steps:

  • Access this GitHub page and download the package called bat in your home directory.
  • Then you must install in / usr / local / bin with:
cd ~

sudo install bat /usr/local/bin

  • Now you can start executing bat commands. For example, to see the load threshold:
bat -t

  • To set the charge threshold to 60% and that when the battery reaches that figure, the charging stops:
bat -t 60

  • Make the change permanent:
bat -p

  • Reverse the change:
bat -r

  • Show the current charge level of your battery with bat:
bat -c

  • And even being able to show the status with:
bat -s

I hope it has helped you and you can enjoy these improvements that with bat are now available in Linux in the absence of ASUS deign to launch its native software also for this platform ...


The content of the article adheres to our principles of editorial ethics. To report an error click here!.

A comment, leave yours

Leave a Comment

Your email address will not be published.

*

*

  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   aedwwuohfoe said

    Well, I have a problem with that, that I already have a command called bat, which is like cat but with syntax highlight and which launches less. I guess I'll rename the binary from bat to battery. although if I remember correctly, the linux drivers of my rog laptop (asusctl) already have that.