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
Previous Post
How to Add User to Sudoers (on Linux)?
Next Post
How to Search for Strings, Patterns or Words From a File?
comments powered by Disqus