Green YGreck Guides FR
🐧 LinuxIntermediate⏱ 10 min5 steps

Services and logs with systemd

Start, stop and diagnose a service.

  1. Service status:
    systemctl status nginx
  2. Start / stop / restart:
    sudo systemctl start nginx
    sudo systemctl stop nginx
    sudo systemctl restart nginx
  3. Enable at boot (and start right now):
    sudo systemctl enable --now nginx
  4. Read the service's logs since the last boot:
    journalctl -u nginx -b
  5. Failed services:
    systemctl --failed