You often need to restart a service on your VPS. Here are the most common commands:
Basic commands
Restart a service:systemctl restart service-name
Stop:
systemctl stop service-name
Start:
systemctl start service-name
Check the status:
systemctl status service-name
Most common services
| Service | Command ||--------|---------|
| Nginx |
systemctl restart nginx || Apache |
systemctl restart apache2 || MySQL |
systemctl restart mysql || PHP-FPM |
systemctl restart php8.3-fpm || SSH |
systemctl restart ssh |Start automatically after a reboot
systemctl enable service-nameView the logs after an error
journalctl -u service-name -n 50Any questions? Write here!