Linux Labs

Packages, services, and logs / Stage 10 of 13

The journal as evidence

Not running Starting usually ~20 s
Leave the lesson

Step 7 of 7 · summary · 2 min

Summary

  • The journal keeps the records of every run; a service's state describes only the last one.
  • -u, -b, --since, -n and -p narrow a selection to the right service, time and severity.
  • -p err keeps the errors, while the details and the order of events show in the full selection.
  • sudo journalctl … > file saves a selection to a file that belongs to you.
  • At the start of the lesson the service was fine, yet the journal showed its error: it kept the records of every run, and the first one ended in failure.
Ubuntu 24.04
Loading…