gawk command not found

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

Introduction

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

gawk: command not found

or when using sudo you get the following error message

sudo: gawk: command not found

Solutions to gawk: command not found

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

In Ubuntu gawk is provided by gawk package.

gawk is:

`awk’, a program that you can use to select particular records in a file and perform operations upon them.

Gawk is the GNU Project’s implementation of the AWK programming language. It conforms to the definition of the language in the POSIX 1003.2 Command Language And Utilities Standard. This version in turn is based on the description in The AWK Programming Language, by Aho, Kernighan, and Weinberger, with the additional features defined in the System V Release 4 version of UNIX awk. Gawk also provides more recent Bell Labs awk extensions, and some GNU-specific extensions.

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

sudo apt-get -y install gawk

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

You can also use apt command to install gawk.

sudo apt -y install gawk

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

sudo aptitude install gawk

Summary

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