Logs

Common Linux log files names and usage

To view a common log file called /var/log/messages use any one of the following command:

We will get all logs related details inside in /var/log directory in Centos.

complete logs we will get here including network logs or if you are using VMWARE so, here vm your machine logs also will be store here.

# more -f /var/log/messages
# cat /var/log/messages
# tail -f /var/log/messages
# grep -i error /var/log/messages

  • /var/log/messages : General message and system related stuff
  • /var/log/auth.log : Authenication logs
  • /var/log/kern.log : Kernel logs
  • /var/log/cron.log : Crond logs (cron job)
  • /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.

Even Ubuntu Server Logs also store in /var/log directory

Log files vpn user in ubuntu

shariq@vpn:/var/log$ sudo cat vmware-network.log

shariq@vpn:/var/log$ cat kern.log