Tools › Cheat sheets › System Administration › journalctl
📜

journalctl cheat sheet

journalctl reads the systemd journal, the log store used by most modern Linux systems. Add sudo if you are not in the systemd-journal group.

Click any command to copy it.

Everyday use

CommandWhat it does
journalctl -u NAMEShow logs for one service.
journalctl -u NAME -fFollow a service's logs live, like tail -f.
journalctl -n 100Show the last 100 lines.
journalctl -fFollow all new log entries.
journalctl -rShow newest entries first.
journalctl --no-pagerPrint without the pager, handy for piping.
journalctl -u a -u bCombine logs from several units.

Filter by time and boot

CommandWhat it does
journalctl --since "1 hour ago"Entries from the last hour.
journalctl --since todayEntries since midnight.
journalctl --since "2026-01-01 08:00" --until "2026-01-01 09:00"Entries within a time window.
journalctl -bEntries from the current boot.
journalctl -b -1Entries from the previous boot.
journalctl --list-bootsList the boots stored in the journal.

Filter by priority and content

CommandWhat it does
journalctl -p errOnly errors and worse (emerg, alert, crit, err).
journalctl -p warning -bWarnings and worse since boot.
journalctl -kKernel messages only (like dmesg).
journalctl -g "timeout"Filter messages matching a regular expression.
journalctl _PID=1234Entries from one process ID.
journalctl -o json-prettyOutput entries as formatted JSON.

Disk usage and cleanup

CommandWhat it does
journalctl --disk-usageShow how much space the journal uses.
journalctl --vacuum-time=2weeksDestructive: Delete journal entries older than two weeks.
journalctl --vacuum-size=500MDestructive: Shrink the journal to at most 500 MB by deleting the oldest entries.
journalctl --verifyCheck journal files for corruption.

Frequently asked questions

Why do I see no logs for my service?

Persistent storage may be disabled, or you may lack permission. Run with sudo, and check that /var/log/journal exists if you need logs to survive reboots.

How do I limit journal size permanently?

Set SystemMaxUse=500M in /etc/systemd/journald.conf and restart systemd-journald.

More System Administration cheat sheets

⚙️ systemctl📦 apt🎩 dnf / yum👥 Users & groups📊 Processes & performance💽 Disks & storage🔄 rsync⏱️ Cron expressionsAll System Administration cheat sheets →
Copied to clipboard