Linux Log Files Location?

Paul Wellner Bou

Well-known member
Registered
Joined
Apr 20, 2016
Messages
95
Points
6
Hey everyone,
I am a new Linux user. I would like to know where are the log files located under CentOS Linux server? How do I open or view log files on Linux operating systems?
 

RDO Servers

Well-known member
Registered
Joined
Apr 3, 2015
Messages
1,027
Points
83
Hey Paul

Most Linux log files are in /var/log/

Enter directory
# cd /var/log/

List files in folder, to get filename of log
# ls

View log file contents
# cat /var/log/filename
 

Joshua Farrell

New member
Registered
Joined
Apr 21, 2016
Messages
3
Points
0
Hey everyone,
I am a new Linux user. I would like to know where are the log files located under CentOS Linux server? How do I open or view log files on Linux operating systems?
You can use the following commands to see the log files:
less
more
cat
grep
tail
zcat
zgrep
zmore

for example, any one of the following command:
# less /var/log/messages
# more -f /var/log/messages
# cat /var/log/messages
# tail -f /var/log/messages
# grep -i error /var/log/messages
Here's paths to files names

/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/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/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 : Yum command log file.
Hope that helps!
 
Older Threads
Replies
5
Views
3,435
Replies
3
Views
2,834
Replies
5
Views
4,789
Replies
0
Views
2,029
Newer Threads
Replies
84
Views
40,121
Replies
1
Views
2,150
Replies
1
Views
2,499
Latest Threads
Replies
0
Views
123
Replies
1
Views
79

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top