Course contentsShow
← Security
Lesson 1469 of 3,05230. Operating System Security - MonitoringFree lesson

Common Log File Locations

Identifying critical log files on Linux and Windows systems for security monitoring.

Common Log File Locations

What you'll learn: You'll discover where Linux and Windows operating systems store their most critical security-relevant log files so you can monitor them effectively.


Why Log Locations Matter

Knowing where logs live is like knowing where security cameras record their footage—you can't investigate an incident if you can't find the evidence. Different operating systems and services write logs to specific, predictable locations that security professionals must know by heart.


Linux Critical Log Locations

On most Linux distributions, logs live under /var/log/:

  • /var/log/auth.log (Debian/Ubuntu) or /var/log/secure (RHEL/CentOS): Authentication attempts, sudo usage, SSH logins—your frontline security data
  • /var/log/syslog or /var/log/messages: General system messages including kernel events and service activity
  • /var/log/audit/audit.log: Linux Audit daemon logs (auditd) tracking system calls and file access
  • /var/log/kern.log: Kernel-specific messages, useful for detecting rootkits or kernel exploits
  • /var/log/apache2/ or /var/log/nginx/: Web server access and error logs

Application-specific logs often appear in /var/log/<service-name>/.


Windows Critical Log Locations

Windows uses the Event Log system, viewed through Event Viewer but stored physically as .evtx files in:

C:\Windows\System32\winevt\Logs\

Key logs:

  • Security.evtx: Authentication, privilege use, object access
  • System.evtx: Service starts/stops, driver loads, system errors
  • Application.evtx: Application-level events and crashes
  • Microsoft-Windows-PowerShell%4Operational.evtx: PowerShell script execution (critical for detecting malicious scripts)

Pro Tips

Check both standard locations and service-specific directories. Applications like databases or web servers often maintain their own logs outside these default paths.

Key Takeaway: Linux logs concentrate in /var/log/ with security events in auth.log/secure; Windows centralizes logs in Event Viewer (.evtx files) with Security.evtx as the primary security audit source.