Logs and Diagnostics

journalctl

Reads the systemd journal.

journalctl queries structured logs collected by systemd-journald, including service logs, boot logs, and kernel messages.

Syntax
journalctl [options]

Arguments explained

  • -u filters by unit.
  • -f follows new entries.
  • -b shows current boot.
  • -p filters by priority.
  • --since filters by time.

Common examples

Read a service log
journalctl -u nginx --since "1 hour ago"

Shows nginx logs from the last hour.

Follow current boot logs
journalctl -b -f

Streams new journal entries for this boot.

journalctl Command
FieldDetails
Commandjournalctl
CategoryLogs and Diagnostics
Primary useReads the systemd journal.
Syntaxjournalctl [options]