Common Locations
Typical location & description of various Linux log files
Common Linux log files names and usage
/var/log/messages : General message and system related stuff
/var/log/auth.log : Authentication logs
/var/log/secure : Authentication & security logs (RedHat/CentOS)
/var/log/audit/audit* : Audit logs (RedHat/CentOS)
/var/log/kern.log : Kernel logs
/var/log/cron.log : Crond logs (cron job)
/var/log/maillog : Mail server logs
/var/log/qmail/ : Qmail log directory (more files inside this directory)
/var/log/httpd/ : Apache access and error logs directory
/var/log/lighttpd/ : Lighttpd access and error logs directory
/var/log/nginx/ : Nginx access and error logs directory
/var/log/apt/ : Apt/apt-get command history and logs directory
/var/log/boot.log : System boot log
/var/log/mysqld.log : MySQL database server log file
/var/log/secure or /var/log/auth.log : Authentication log
/var/log/utmp or /var/log/wtmp : Login records file
/var/log/yum.log or /var/log/dnf.log: Yum/Dnf command log file.
Printing the Linux kernel ring buffer messages
We use the dmesg command to examine or control the kernel ring buffer. The default action is to display all messages from the kernel ring buffer. For example:
sudo dmesg
sudo dmesg | grep 'error'
sudo dmesg | grep -i -E 'error|warn|failed'
sudo dmesg | more
Without any arguments, all collected logs are shown unfiltered as follows:
journalctl
Last updated