hex command not found

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

Introduction

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

hex: command not found

or when using sudo you get the following error message

sudo: hex: command not found

Solutions to hex: command not found

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

In Ubuntu hex is provided by basez package.

basez is:

BaseZ encodes/decodes base16, base32, base32hex, base64 or base64url data stream per RFC 4648; MIME base64 Content-Transfer-Encoding per RFC 2045; or PEM Printable Encoding per RFC 1421.

This binary package provides a list of commands: basez hex base16 base32plain base32hex base64plain base64url base64mime base64pem

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

sudo apt-get -y install basez

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

You can also use apt command to install basez.

sudo apt -y install basez

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

sudo aptitude install basez

Summary

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