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/syslogor/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 accessSystem.evtx: Service starts/stops, driver loads, system errorsApplication.evtx: Application-level events and crashesMicrosoft-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.