{"tool":"journalctl","name":"journalctl","description":"Queries the systemd journal: logs by service, boot, time range, priority and more.","tags":["logs","systemd","incident response"],"homepage":"https://systemd.io","docs":"https://www.freedesktop.org/software/systemd/man/latest/journalctl.html","related":["systemctl","tail","auditd"],"total_commands":21,"commands":[{"id":1,"category":"Reading","command":"journalctl","example":"journalctl","explanation":"The whole journal, oldest first, in a pager."},{"id":11,"category":"Reading","command":"journalctl -r","example":"journalctl -r","explanation":"Newest first."},{"id":2,"category":"Reading","command":"journalctl -f","example":"journalctl -f","explanation":"Follows new entries live, like tail -f."},{"id":12,"category":"Reading","command":"journalctl -n <n>","example":"journalctl -n 100","explanation":"The last n entries."},{"id":13,"category":"Reading","command":"journalctl -e","example":"journalctl -e","explanation":"Opens at the end of the journal."},{"id":14,"category":"Reading","command":"journalctl -x -e","example":"journalctl -x -e","explanation":"Adds explanatory help text to entries where available."},{"id":15,"category":"Filtering","command":"journalctl -u <unit>","example":"journalctl -u ssh","explanation":"Entries from one service."},{"id":16,"category":"Filtering","command":"journalctl -u <unit> --since \"<time>\"","example":"journalctl -u nginx --since \"1 hour ago\"","explanation":"Time-limited; accepts “today”, “yesterday” or exact timestamps."},{"id":17,"category":"Filtering","command":"journalctl --since \"<start>\" --until \"<end>\"","example":"journalctl --since \"2026-11-05 22:00\" --until \"2026-11-06 02:00\"","explanation":"A specific window — the core of incident triage."},{"id":6,"category":"Filtering","command":"journalctl -b","example":"journalctl -b","explanation":"The current boot only. -b -1 is the previous boot."},{"id":18,"category":"Filtering","command":"journalctl --list-boots","example":"journalctl --list-boots","explanation":"Every recorded boot with its time range — shows unexpected reboots."},{"id":19,"category":"Filtering","command":"journalctl -p err -b","example":"journalctl -p err -b","explanation":"Errors and worse since boot. Levels: emerg, alert, crit, err, warning, notice, info, debug."},{"id":20,"category":"Filtering","command":"journalctl -k","example":"journalctl -k","explanation":"Kernel messages, like dmesg."},{"id":21,"category":"Filtering","command":"journalctl _UID=<uid>","example":"journalctl _UID=1001","explanation":"Entries generated by a user."},{"id":22,"category":"Filtering","command":"journalctl _COMM=<name>","example":"journalctl _COMM=sudo","explanation":"Entries from one executable — here, every sudo use."},{"id":23,"category":"Filtering","command":"journalctl -g \"<regex>\"","example":"journalctl -u ssh -g \"Failed password|Invalid user\"","explanation":"Greps message text (systemd 237+)."},{"id":24,"category":"Output and maintenance","command":"journalctl -o json-pretty -n 5","example":"journalctl -o json-pretty -n 5","explanation":"Structured output with every field — useful for shipping to a SIEM."},{"id":25,"category":"Output and maintenance","command":"journalctl -o short-iso","example":"journalctl -o short-iso","explanation":"ISO 8601 timestamps."},{"id":9,"category":"Output and maintenance","command":"journalctl --disk-usage","example":"journalctl --disk-usage","explanation":"How much space the journal uses."},{"id":26,"category":"Output and maintenance","command":"sudo journalctl --vacuum-time=<age>","example":"sudo journalctl --vacuum-time=30d","explanation":"Deletes entries older than the given age."},{"id":27,"category":"Output and maintenance","command":"journalctl --verify","example":"journalctl --verify","explanation":"Checks journal files for corruption or tampering when sealing is enabled."}],"slug":"journalctl","category":"linux","url":"https://terminal.rokibulroni.com/tool/linux/journalctl","markdown":"https://terminal.rokibulroni.com/api/v1/tools/linux/journalctl.md"}