journalctl Cheat Sheet
Query the systemd journal — filter by unit, boot, time, priority, and follow live output.
Troubleshooting3 sections · 21 commands
⌘K
Viewing Logs
6journalctlAll logs, oldest first
journalctl -n 50Last 50 lines
journalctl -fFollow live output
journalctl -rNewest first
journalctl --no-pagerPrint without a pager
journalctl -kKernel messages only
Filtering
9journalctl -u nginx.serviceOne unit's logs
journalctl -u a -u bMultiple units
journalctl -bCurrent boot only
journalctl -b -1Previous boot
journalctl --since '1 hour ago'Relative time window
journalctl --until yesterdayUntil a date/time
journalctl -p errPriority err and above
journalctl _PID=123Logs from one PID
journalctl _SYSTEMD_UNIT=nginx.serviceFilter by internal field
Disk & Management
6journalctl --disk-usageJournal size on disk
journalctl --vacuum-size=500MTrim journal to 500 MB
journalctl --vacuum-time=7dKeep only 7 days
journalctl --verifyCheck journal integrity
journalctl -o jsonExport entries as JSON
journalctl --output=short-preciseWith microsecond timestamps