compress command not found

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

Introduction

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

compress: command not found

or when using sudo you get the following error message

sudo: compress: command not found

Solutions to compress: command not found

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

In Ubuntu compress is provided by ncompress package.

ncompress is:

This package provides the original compress and uncompress programs that used to be the de facto UNIX standard for compressing and uncompressing files. These programs implement a fast, simple Lempel-Ziv (LZW) file compression algorithm.

For Debian, the standard uncompress program is installed as uncompress.real, to avoid conflicting with other packages.

This package also contains a copyright notice and a brief discussion of the LZW patent history (written by one of the original authors) in the file /usr/share/doc/ncompress/README.Debian.

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

sudo apt-get -y install ncompress

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

You can also use apt command to install ncompress.

sudo apt -y install ncompress

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

sudo aptitude install ncompress

Summary

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