Linux Log Analysis

This page docs the common log file in linux system. To see how to use command line to analyze them, see Bo Cyber Logbook - Log Analysis

By default, Linux is a “silent” operator. It logs system health and access, but it doesn’t log user activity.

Out of the box, Three Major Linux Logs:

Some Common Logs:

Auditd - User Activity Log - Bo Cyber Logbook - Linux Auditd Log

Like mentioned, user activty dese not get logged out of the box. In that case, we need a special tool called auditd (similar to sysmon in Windows) This is the standard tool for tracking Runtime Events. It monitors “System Calls” (when a program asks the kernel to do something).

How does it work?

When user types whoami in a shell, the shell will triger exec function in linux:
whoami -> shell do exec("/usr/bin/whoami") -> kernel
The auditd tools track this system call and log it.

Wait!

However, this can result in a massive amount of data, creating a lot of noise in SIEM. Therefore, we need to selectively log data that useful to us. We write Audit Rules to watch only for high-risk behavior:

How do We see it?

We can view the generated logs in real time in /var/log/audit/audit.log, but it is easier to use the ausearch command, as it formats the output for better readability and supports filtering options.

Entended Readings


Last Modified: 2026-01-03