Managing Services on Linux With systemctl
On this page
Most modern Linux distributions use systemd to manage background services like web servers, databases and other applications running on your Cloud Server.
Checking a service's status
sudo systemctl status servicename — for example, sudo systemctl status nginx
Starting, stopping and restarting a service
sudo systemctl start servicenamesudo systemctl stop servicenamesudo systemctl restart servicename— stops and starts it again, useful after a configuration change
Enabling a service to start automatically on boot
sudo systemctl enable servicename
To stop it from starting automatically: sudo systemctl disable servicename
Viewing a service's logs
sudo journalctl -u servicename shows the log output for a specific service, useful for troubleshooting why it won't start.
Did this answer your question?
Thanks, your feedback has been sent.