View logs:
journalctl
journalctl -b # current boot
journalctl -b -1 # previous boot
journalctl -u ssh # unit logs
journalctl -f # follow
Time filtering:
journalctl --since "2026-05-05 09:00" --until "2026-05-05 10:00"
Size / retention:
journalctl --disk-usage
sudo journalctl --vacuum-time=14d
sudo journalctl --vacuum-size=500M
Common files (distro-dependent):
/var/log/syslog (Debian/Ubuntu)/var/log/messages (RHEL/CentOS)/var/log/auth.log or /var/log/secureQuick tail (GNU coreutils):
sudo tail -n 200 /var/log/syslog
sudo tail -f /var/log/auth.log
Config:
/etc/logrotate.conf/etc/logrotate.d/*Test:
sudo logrotate -d /etc/logrotate.conf
journalctl -u <unit> for systemd-managed servicesgrep if needed