How to manage an Apache Web Server using a Terminal on a Ubuntu/Linux machine?

Use the service command to perform the below basic operations on the Apache Web Server installed on Ubuntu/Linux machine.

Use the below command to start the Apache Web Server.

sudo service apache2 start

Use the below command to stop the Apache Web Server.

sudo service apache2 stop

Use the below command to restart the Apache Web Server.

sudo service apache2 restart

Use the below command to check the status of the Apache Web Server.

sudo service apache2 status

Related Links