xbattbar command not found

In this troubleshooting guide we learn how to fix xbattbar command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

xbattbar: command not found

or when using sudo you get the following error message

sudo: xbattbar: command not found

Solutions to xbattbar: command not found

How To Fix xbattbar: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu xbattbar is provided by xbattbar package.

xbattbar is:

Xbattbar displays the current (laptop) battery status in the X window environment. Battery status is obtained through the APM interface.

The battery indicator of this program is very simple: a simple bar at the top/bottom of your display. With its color, it indicates the AC-line status (plugged in or off-line), and battery charging/remaining level. Also, if the mouse cursor enters the indicator window, a popup diagnosis window comes up in the center of your display showing the current AC line status and battery level.

This package supports ACPI and APM checks for battery status.

To fix this problem, we can install more using the command below.

sudo apt-get -y install xbattbar

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install xbattbar.

sudo apt -y install xbattbar

Or if you have aptitude installed you can use the following command.

sudo aptitude install xbattbar

Summary

In this tutorial we learn how to fix xbattbar command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.