How to stop an Apache 2 server or service in Linux?

Published July 2, 2021

To stop an Apache 2 server or service, we can use the systemctl command-line utility followed by the stop apache2.service command in Linux.

# Stops apache 2 service
sudo systemctl stop apache2.service

What is systemctl?

  • The systemctl is a command-line utility that is used to control and manage the systemd services.
  • It is widely used with web server services like Apache, Nginx, etc.

Feel free to share if you found this useful 😃.


Share on: Facebook Twitter