ubuntu enable/disable service

Start/stop/restart …. using `sudo service`

sudo service <service_name> start|stop|restart

Ex
sudo service nginx start

Start/stop/restart… user `sudo systemctl`

sudo systemctl start|stop|restart <service_name>

Ex
sudo systemctl start nginx

Enable or disable auto run on boot

sudo systemctl enable|disable <service_name>

Ex
sudo systemctl disable apache2

Leave a Reply

Your email address will not be published.Required fields are marked *