Notes to Self

Alex Sokolsky's Notes on Computers and Programming

jourtnalctl cheat sheet

journalctl man page.

Related: systemctl



Show Service Log

journalctl --no-pager -u _service-name_

Show events since the last boot

journalctl -b

Show today events

journalctl --since=today

Show (follow) current events

journalctl -f

Log Size Control

Retain only the past two days:

journalctl --vacuum-time=2d

Retain only the past 500 MB:

journalctl --vacuum-size=500M

Explain the messages

Jump to the end, explain the messages:

journalctl -xe

Explain the messages from the very beginning:

journalctl -x --no-pager

Environment Vars

$SYSTEMD_PAGER overwrites $PAGER. Setting this to β€œβ€ or β€œcat” is equivalent to passing --no-pager.