static-sh command not found

In this troubleshooting guide we learn how to fix static-sh command not found error message

Introduction

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

static-sh: command not found

or when using sudo you get the following error message

sudo: static-sh: command not found

Solutions to static-sh: command not found

How To Fix static-sh: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu static-sh is provided by busybox-static package.

busybox-static is:

BusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides minimalist replacements for the most common utilities you would usually find on your desktop system (i.e., ls, cp, mv, mount, tar, etc.). The utilities in BusyBox generally have fewer options than their full-featured GNU cousins; however, the options that are included provide the expected functionality and behave very much like their GNU counterparts.

busybox-static provides you with a statically linked simple stand alone shell that provides all the utilities available in BusyBox. This package is intended to be used as a rescue shell, in the event that you screw up your system. Invoke “busybox sh” and you have a standalone shell ready to save your system from certain destruction. Invoke “busybox”, and it will list the available builtin commands.

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

sudo apt-get -y install busybox-static

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

You can also use apt command to install busybox-static.

sudo apt -y install busybox-static

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

sudo aptitude install busybox-static

Summary

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