/ mozey.co / blog

linux log files

April 18, 2016

🔗 Linux Log Files

🔗 System Logs

🔗 Authorization Log

Info about user logins and usage of the sudo command

grep sshd /var/log/auth.log | tail -n 50

grep sudo /var/log/auth.log | tail -n 50

Filter by month, day and hour

grep "Apr 18 13" /var/log/auth.log

🔗 Daemon Log

Info about running system and application daemons

tail /var/log/daemon.log 

🔗 Debug Log

Detailed debug messages from the Ubuntu system and applications

tail /var/log/debug

🔗 Kernel Log

Detailed log of messages from the Ubuntu Linux kernel

tail /var/log/kern.log

🔗 Kernel Ring Buffer

Not really a log file per se, but rather an area in the running kernel you can query for kernel bootup messages via the dmesg utility

dmesg | tail

dmesg | grep pnp | tail

/var/log/dmesg | tail

🔗 System Log

Most information about Ubuntu system, also contains everything that used to be in /var/log/messages

tail /var/log/syslog

🔗 Application Logs

🔗 Apache HTTP Server Logs

tail /var/log/apache2/access.log

tail /var/log/apache2/error.log

🔗 System Logging Daemon (syslogd)

Awaits logging messages from numerous sources and routes the messages to the appropriate file or network destination

Configuration file is


Place message into the System Log

logger This is the message text
tail /var/log/syslog

See link above for more options