Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Check if Apache is installed on a Ubuntu machine

Tags:

Is there a way to check if Apache is installed on my Ubuntu 14.04 (Trusty Tahr) machine?

I am trying to install LAMP on my Ubuntu installation.

like image 629
Suraj Avatar asked Dec 14 '15 09:12

Suraj


People also ask

Where Apache is installed in Ubuntu?

Like many Linux-based applications, Apache functions through the use of configuration files. They are all located in the /etc/apache2/ directory. Here's a list of other essential directories: /etc/apache2/apache2.

Is Apache preinstalled in Ubuntu?

Apache is available within Ubuntu's default software repositories. You can install it using conventional package management tools.


2 Answers

You can use the below commands to check if Apache is installed or not:

dpkg --get-selections | grep apache 

or

apache2 -v 
like image 84
Manish R Avatar answered Oct 26 '22 23:10

Manish R


Command:

dpkg --get-selections | grep apache 

Output:

apache2            install apache2-bin        install apache2-data       install apache2-utils      install 

Command:

apache2 -v 

Output

Server version: Apache/2.4.18 (Ubuntu) Server built:   2019-10-08T13:31:25 
like image 44
Alankar Avatar answered Oct 27 '22 00:10

Alankar