systemctl is used by most modern Linux distributions to start, stop, restart, enable, and inspect services. You will use it often when managing web servers, databases, bots, and game-server daemons.
| Command | What it does |
|---|---|
sudo systemctl status nginx | Shows whether a service is running and recent log lines. |
sudo systemctl start nginx | Starts a stopped service. |
sudo systemctl stop nginx | Stops a running service. |
sudo systemctl restart nginx | Stops and starts the service again. |
sudo systemctl enable nginx | Starts the service automatically when the VPS boots. |
sudo systemctl disable nginx | Stops the service from starting automatically. |
Replace nginx with the service you are managing. If a service fails to start, check its status output before repeatedly restarting it.
