journalctl
journalctl
the new /var/log/syslog
- see also systemd
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-networkdread 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 -fread last n lines
display last 100 lines and follow new logs:
journalctl -n 100 -flogs since last boot
journalctl -blogs 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"