How to Start, Stop, and Restart Services?

We can use systemctl to interact with services in Linux.

Check if a service is running on Linux#

$ sudo systemctl status nginx

Restarting a service#

$ sudo systemctl restart nginx

Reload a service (reload configuration files)#

$ sudo systemctl reload nginx

Start a service#

$ sudo systemctl start nginx

Stop a service#

$ sudo systemctl stop nginx

Enable a service at boot#

$ sudo systemctl enable nginx

Disable a service at boot#

$ sudo systemctl disable nginx
comments powered by Disqus