bats command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
bats: command not found
or when using sudo you get the following error message
sudo: bats: command not found
Solutions to bats: command not found
How To Fix bats: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu bats is provided by bats package.
bats is:
Bats is a TAP-compliant testing framework for Bash. It provides a simple way to verify that the UNIX programs you write behave as expected. Bats is most useful when testing software written in Bash, but you can use it to test any UNIX program.
To fix this problem, we can install more using the command below.
sudo apt-get -y install bats
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install bats.
sudo apt -y install bats
Or if you have aptitude installed you can use the following command.
sudo aptitude install bats
Summary
In this tutorial we learn how to fix bats command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.