Skip to content

journalctl

the new /var/log/syslog

specify unit / service

use the -u flag to work with a specific service, for example journalctl -u systemd-resolved you can also add multiple units using -u in one go

journalctl -u systemd-resolved
journalctl -u systemd-resolved -u systemd-networkd

read journalctl logs

the following flags can usually be combined, so -f -u <service> works as well.

tail / follow logs

follow all new logs (tail -f):

journalctl -f

read last n lines

display last 100 lines and follow new logs:

journalctl -n 100 -f

logs since last boot

journalctl -b

logs since yesterday | today | 2 hours ago

journalctl -u systemd-resolved --since yesterday
journalctl -u systemd-resolved --since today
journalctl -u systemd-resolved --since "1 hour ago"