

To restart the service systemctl restart apache2

To disable apache2 service on boot up run systemctl disable apache2 To enable apache2 service on boot up run systemctl enable apache2 Process: 2687 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCE Process: 2822 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS To confirm that the service is not running, run systemctl status apache2 OutputĪctive: inactive (dead) since Thu 17:19:47 UTC 12s ago To stop the service running service systemctl stop apache2 Loaded: loaded (/etc/init.d/apache2 bad vendor preset: enabled)ĭrop-In: /lib/systemd/system/Īctive: active (running) since Thu 17:09:05 UTC 35s ago To verify that the service is running, run systemctl status apache2 Output To start a service in systemd run the command as shown: systemctl start service-nameįor example, to start apache web service, run systemctl start apache2 How to enable and disable services in Systemd init How to enable and disable services in SysV init.How to enable and disable services in Upstart init.How to remove Systemd services completely.How to enable and disable services in Systemd init.
