journalctlBasic journal read command.
Read, filter, follow, export, and troubleshoot systemd journal logs.
Read and follow the journal.
journalctlBasic journal read command.
journalctl -rHelpful when looking for the latest errors.
journalctl -fStreams new log entries as they arrive.
journalctl --no-pagerUseful in scripts and pipes.
journalctl -n 100Quickly inspect recent logs.
Focus logs on specific services or units.
journalctl -u nginxMost common service-level filter.
journalctl -u nginx -fGreat for live troubleshooting.
journalctl -u nginx -u php-fpmUseful for related services in one view.
journalctl --user -u myapp.serviceUsed with per-user systemd services.
Inspect one boot or a specific time window.
journalctl --list-bootsLets you reference prior boots by index.
journalctl -bCommon first step after reboot issues.
journalctl -b -1Very useful after crash or reboot analysis.
journalctl --since "2026-03-01 10:00:00"Can use natural-ish formats like today, yesterday, or specific timestamps.
journalctl --since "1 hour ago" --until "now"Useful for narrow incident windows.
Filter by severity, kernel messages, and structured fields.
Show warnings, errors, and critical logs.
journalctl -p warningYou can also use err, crit, alert, and emerg.
journalctl -p err..alertHandy for focused incident review.
journalctl -kModern equivalent to dmesg-style inspection with journal persistence.
journalctl -k -bHelpful for boot and driver issues.
journalctl _EXE=/usr/sbin/sshdField filters are powerful when you know journald metadata.
journalctl _COMM=nginxUseful when unit names vary but process name is stable.
Change output mode and inspect journal health.
journalctl -o jsonGreat for scripts, jq, and structured analysis.
journalctl -o json-prettyUseful for quick manual inspection of fields.
journalctl -o short-isoBetter for copy/paste and incident timelines.
journalctl --disk-usageHelps with log retention and cleanup decisions.
Delete archived journals until under size limit.
sudo journalctl --vacuum-size=500MUse carefully on production systems.
sudo journalctl --vacuum-time=14dRetention control by age.
journalctl --verifyUseful if you suspect journal corruption.