# Common Locations

### 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:\
&#x20;`sudo dmesg`\
&#x20;`sudo dmesg | grep 'error'`\
&#x20;`sudo dmesg | grep -i -E 'error|warn|failed'`\
&#x20;`sudo dmesg | more`

&#x20;Without any arguments, all collected logs are shown unfiltered as follows:\
&#x20;`journalctl`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.iblue.team/linux-forensics/linux.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
