Commands
bash
journalctl -u nginx # entries from the nginx service
journalctl -u nginx -f # follow in real time (like tail -f)
journalctl -u nginx --since "10 min ago"
journalctl -xeu nginx # tail plus explanations (x) when debugging
journalctl -p err -b # only errors from the current boot
journalctl -k # kernel messages (like dmesg)
journalctl --since today --until "1 hour ago"
journalctl -b -1 # the journal of the PREVIOUS boot (before the last reboot)
journalctl -g 'pattern' # grep messages (regex)
journalctl --disk-usage # how much space it takes
sudo journalctl --vacuum-time=7d # drop entries older than 7 days