Contents
The traditional way to start services in Linux was to place a script in /etc/init. d , and then use the update-rc. d command (or in RedHat based distros, chkconfig ) to enable or disable it.
How enable and disable services in Linux?
How to enable and disable services in Systemd init
- To start a service in systemd run the command as shown: systemctl start service-name. …
- Output ● …
- To stop the service running service systemctl stop apache2. …
- Output ● …
- To enable apache2 service on boot up run. …
- To disable apache2 service on boot up run systemctl disable apache2.
23 мар. 2018 г.
How do I start a service in Linux?
- Linux provides fine-grained control over system services through systemd, using the systemctl command. …
- To verify whether a service is active or not, run this command: sudo systemctl status apache2. …
- To stop and restart the service in Linux, use the command: sudo systemctl restart SERVICE_NAME.