System Logs

Where Logs Live

Traditional text logs are under /var/log:

FileContents
/var/log/syslog / messagesGeneral system messages
/var/log/auth.log / secureAuthentication & sudo
/var/log/kern.logKernel messages
/var/log/dmesgBoot-time kernel ring buffer
/var/log/boot.logBoot service output

Modern systemd systems centralise logs in the journal (journalctl, covered in the systemd module) - many distros run both.

$ sudo tail -f /var/log/auth.log
$ journalctl -u ssh --since '10 min ago'
Exam tip: Debian uses syslog/auth.log; RHEL uses messages/secure. Know both names.