journalctl
SystemFundamentalsReference onlyQuery the systemd journal
Name: journalctl = journal control
This command is outside what the site lets you practise (mostly distribution-specific or rarely used tools). This page describes how to use it; try it on your own Linux system.
Description
journalctl queries the systemd journal, which collects logs from the kernel, services and applications. Filter by unit (-u), time (--since), priority (-p) or boot (-b), and follow with -f.
Syntax
journalctl [OPTION]...Common options
| -u / --unit UNIT | Only one unit |
| -f / --follow | Follow new entries |
| -n / --lines NUM | Last N entries |
| -e / --pager-end | Jump to the end |
| -r / --reverse | Newest first |
| --since TIME | Since a time, e.g. "1 hour ago" |
| --until TIME | Up to a time |
| -b / --boot | Only this boot (-b -1 is the previous one) |
| -k / --dmesg | Kernel messages only |
| -p err | Errors only |
| -o / --output MODE | Output format, e.g. short-iso, json, cat |
| --no-pager | Print straight out, without a pager (for pipes) |
| --disk-usage | How much disk the journal uses |
| --vacuum-size SIZE | Delete old logs until they take at most SIZE, e.g. 500M |