apt command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
apt: command not found
or when using sudo you get the following error message
sudo: apt: command not found
Solutions to apt: command not found
How To Fix apt: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu apt is provided by apt package.
apt is:
This package provides commandline tools for searching and managing as well as querying information about packages as a low-level access to all features of the libapt-pkg library.
These include:
- apt-get for retrieval of packages and information about them from authenticated sources and for installation, upgrade and removal of packages together with their dependencies
- apt-cache for querying available information about installed as well as installable packages
- apt-cdrom to use removable media as a source for packages
- apt-config as an interface to the configuration settings
- apt-key as an interface to manage authentication keys
To fix this problem, we can install more using the command below.
sudo apt-get -y install apt
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install apt.
sudo apt -y install apt
Or if you have aptitude installed you can use the following command.
sudo aptitude install apt
Summary
In this tutorial we learn how to fix apt command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.