zgrep command not found

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

Introduction

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

zgrep: command not found

or when using sudo you get the following error message

sudo: zgrep: command not found

Solutions to zgrep: command not found

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

In Ubuntu zgrep is provided by gzip package.

gzip is:

This package provides the standard GNU file compression utilities, which are also the default compression tools for Debian. They typically operate on files with names ending in ‘.gz’, but can also decompress files ending in ‘.Z’ created with ‘compress’.

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

sudo apt-get -y install gzip

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

You can also use apt command to install gzip.

sudo apt -y install gzip

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

sudo aptitude install gzip

Summary

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