journalctl

Linux · System · available in the simulator

What it does

Query and view system logs managed by systemd.

Syntax

journalctl [opciones]

Options and parameters

  • -u

    Show logs for the specified unit.

    journalctl -u nginx
  • -f

    Follow new log entries in real time.

  • -n

    Show the specified number of recent lines.

    journalctl -n 100
  • -b

    Show logs from the current boot.

  • -p

    Filter by message priority, for example err.

    journalctl -p err -b
  • --since

    Filter entries starting from the specified date/time.

    journalctl --since "2026-01-01"

Usage examples

  • journalctl -u nginx
  • journalctl -n 100
  • journalctl -p err -b
  • journalctl --since "2026-01-01"
Practise journalctl

Related commands