How to Manage Services with systemd on Ubuntu
systemd controls services (daemons) on Ubuntu. Use systemctl to start, stop and monitor them.
Common service commands
sudo systemctl start nginx # start now
sudo systemctl stop nginx # stop now
sudo systemctl restart nginx # restart
sudo systemctl reload nginx # reload config without downtime
sudo systemctl status nginx # check statusEnable services at boot
sudo systemctl enable nginx # start automatically at boot
sudo systemctl disable nginx # don't start at boot
sudo systemctl enable --now nginx # enable + start togetherViewing logs
journalctl -u nginx # logs for a service
journalctl -u nginx -f # follow live
journalctl -xe # recent errorsUse systemctl list-units --type=service to see all running services.