Services and logs with systemd
Start, stop and diagnose a service.
- Service status:
systemctl status nginx
- Start / stop / restart:
sudo systemctl start nginx sudo systemctl stop nginx sudo systemctl restart nginx
- Enable at boot (and start right now):
sudo systemctl enable --now nginx
- Read the service's logs since the last boot:
journalctl -u nginx -b
- Failed services:
systemctl --failed