ack command not found

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

Introduction

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

ack: command not found

or when using sudo you get the following error message

sudo: ack: command not found

Solutions to ack: command not found

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

In Ubuntu ack is provided by ack package.

ack is:

Ack is designed as an alternative for 99% of the uses of grep. ack is intelligent about the files it searches. It knows about certain file types, based on both the extension on the file and, in some cases, the contents of the file.

Ack ignores backup files and files under CVS and .svn directories. It also highlights matches to help you see where the match was. Ack uses perl regular expressions.

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

sudo apt-get -y install ack

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

You can also use apt command to install ack.

sudo apt -y install ack

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

sudo aptitude install ack

Summary

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