How do I stop Apache from starting on Linux?

The process to stop Apache from starting on Linux depends on the distribution and the init system you are using. Here are the common methods to stop Apache from starting:

  1. SysV Init Systems: On systems using SysV Init, you can use the following command to disable the Apache service:
sudo chkconfig apache2 off
  1. Systemd: On systems using Systemd, you can use the following command to disable the Apache service:
sudo systemctl disable apache2.service

These commands will prevent Apache from starting automatically on boot. If you want to stop Apache after it has already started, you can use the following command:

sudo service apache2 stop

Note: The exact name of the Apache service may vary based on your distribution, but it is usually httpd or apache2.

Leave a Comment