Linux Logs

​Logs in Linux are stored in the /var/log directory. ​Remember that the slash var directory ​stands for variable, ​meaning files that constantly ​change are kept in this directory. Pasted image 20260625070823 Let’s check out some of the common ones ​you’ll look at it. ​

/var/log/auth.log. Authorization and ​security-related events are logged here.

​/var/log/kern.log.  Kernel messages are logged here.  ​ /var/log/dmesg system startup messages are logged here. ​If you encounter an issue at, ​let’s say boot up, this is ​a good place to check for information.

The one log file that logs pretty much everything on ​your system is the /var/log/syslog file When troubleshooting issues with user machines ​/var/log/syslog will usually contain ​the most comprehensive information about your system.

Log rotation: A way for the OS to clean out log files to make room for new ones

Centralized logging: Parsing logs in one central location 

Unix epoch: It is the number of seconds since midnight on January first, 1970. It’s a ‘Zero Hour’ for Unix based computers to anchor their concept of time

For more information about logrotate, or the command to manage large numbers of log files in Linux, check out the link here