add-apt-key command not found

In this troubleshooting guide we learn how to fix add-apt-key command not found error message

Introduction

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

add-apt-key: command not found

or when using sudo you get the following error message

sudo: add-apt-key: command not found

Solutions to add-apt-key: command not found

How To Fix add-apt-key: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu add-apt-key is provided by add-apt-key package.

add-apt-key is:

The command add-apt-key provides a convenient command line interface which will add a new GPG key to your APT keyring.

Those who are more graphically inclined may prefer the package gui-apt-key.

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

sudo apt-get -y install add-apt-key

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

You can also use apt command to install add-apt-key.

sudo apt -y install add-apt-key

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

sudo aptitude install add-apt-key

Summary

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