shellcheck command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
shellcheck: command not found
or when using sudo you get the following error message
sudo: shellcheck: command not found
Solutions to shellcheck: command not found
How To Fix shellcheck: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu shellcheck is provided by shellcheck package.
shellcheck is:
The goals of ShellCheck are:
To point out and clarify typical beginner’s syntax issues, that causes a shell to give cryptic error messages.
To point out and clarify typical intermediate level semantic problems, that causes a shell to behave strangely and counter-intuitively.
To point out subtle caveats, corner cases and pitfalls, that may cause an advanced user’s otherwise working script to fail under future circumstances.
To fix this problem, we can install more using the command below.
sudo apt-get -y install shellcheck
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install shellcheck.
sudo apt -y install shellcheck
Or if you have aptitude installed you can use the following command.
sudo aptitude install shellcheck
Summary
In this tutorial we learn how to fix shellcheck command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.