a2ensite command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
a2ensite: command not found
or when using sudo you get the following error message
sudo: a2ensite: command not found
Solutions to a2ensite: command not found
How To Fix a2ensite: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu a2ensite is provided by apache2 package.
apache2 is:
The Apache HTTP Server Project’s goal is to build a secure, efficient and extensible HTTP server as standards-compliant open source software. The result has long been the number one web server on the Internet.
Installing this package results in a full installation, including the configuration files, init scripts and support scripts.
To fix this problem, we can install more using the command below.
sudo apt-get -y install apache2
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install apache2.
sudo apt -y install apache2
Or if you have aptitude installed you can use the following command.
sudo aptitude install apache2
Summary
In this tutorial we learn how to fix a2ensite command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.