Page cover

🐧Linux basics: file paths

03-05-2024

Linux is a powerful operating system that runs on most servers worldwide. Its important to know where to find system information and log files to troubleshoot, maintain and update your Linux system. I have compiled a list of the most common used log file paths.

General system messages, including kernel messages:

/var/log/messages

Authentication-related messages, including sudo activity and SSH logins:

/var/log/auth.log

Kernel messages. Useful for troubleshooting hardware and driver-related issues:

/var/log/kern.log

Information about the boot process:

/var/log/boot.log

Kernel ring buffer messages. Contains information logged during the boot process:

/var/log/dmesg

Information logged by system daemons such as cron, init, and syslog:

Apache web server access and error logs:

/var/log/apache2/access.log
/var/log/apache2/error.log

Nginx web server access and error logs:

/var/log/nginx/access.log
/var/log/nginx/error.log

MySQL database server error log:

/var/log/mysql/error.log

Authentication-related messages, particularly on systems using the syslog daemon:

/var/log/secure

Mail server log, useful for troubleshooting email-related issues (e.g., Postfix, Sendmail):

/var/log/mail.log

Logs for cron jobs, which include scheduled tasks:

/var/log/cron

Audit log messages. Useful for monitoring security-related events:

/var/log/audit/audit.log

Information about the last login times for users:

/var/log/lastlog

Logs for the Uncomplicated Firewall (UFW) on Ubuntu and Debian systems:

/var/log/ufw.log

Understanding and regularly checking log file paths in Linux is invaluable for system administrators and users alike. These paths offer a window into the inner workings of your system, providing crucial insights into its health, performance, and security.

Last updated