About Linux FAQ

Browse More FAQs:

View log files in Ubuntu Linux

Posted by Vivek Gite [Last updated: August 2, 2007]

Q. Can you explain me log files in Ubuntu Linux and how do I view logs?

A. All logs are stored in /var/log directory under Ubuntu (and other Linux distro).

Linux Log files and usage

=> /var/log/messages : General log messages

=> /var/log/boot : System boot log

=> /var/log/debug : Debugging log messages

=> /var/log/auth.log : User login and authentication logs

=> /var/log/daemon.log : Running services such as squid, ntpd and others log message to this file

=> /var/log/dmesg : Linux kernel ring buffer log

=> /var/log/dpkg.log : All binary package log includes package installation and other information

=> /var/log/faillog : User failed login log file

=> /var/log/kern.log : Kernel log file

=> /var/log/lpr.log : Printer log file

=> /var/log/mail.* : All mail server message log files

=> /var/log/mysql.* : MySQL server log file

=> /var/log/user.log : All userlevel logs

=> /var/log/xorg.0.log : X.org log file

=> /var/log/apache2/* : Apache web server log files directory

=> /var/log/lighttpd/* : Lighttpd web server log files directory

=> /var/log/fsck/* : fsck command log

=> /var/log/apport.log : Application crash report / log file

To view log files at shell prompt

Use tail, more, less and grep command.
tail -f /var/log/apport.log
more /var/log/xorg.0.log
cat /var/log/mysql.err
less /var/log/messages
grep -i fail /var/log/boot

View log files using GUI tools using the GNOME System Log Viewer

System Log Viewer is a graphical, menu-driven viewer that you can use to view and monitor your system logs. System Log Viewer comes with a few functions that can help you manage your logs, including a calendar, log monitor and log statistics display. System Log Viewer is useful if you are new to system administration because it provides an easier, more user-friendly display of your logs than a text display of the log file. It is also useful for more experienced administrators, as it contains a calendar to help you locate trends and track problems, as well as a monitor to enable you to continuously monitor crucial logs.

You can start System Log Viewer in the following ways:

Click on System menu > Choose Administration > System Log:
View log files in Ubuntu Linux
(The GNOME System Log Viewer)

Note you can start the GNOME System Log Viewer from a shell prompt, by entering the following command:
$ gnome-system-log &

E-mail    Print    Can't find an answer to your question? Contact us

Related Other Helpful FAQs:

Discussion on This FAQ

  1. Vincent Tournebise Says:

    When I start gnome-system-log there are no files open. I have to pick them manually.
    I’m trying to view my Apache logs, old ones which are gzipped, and it won’t open them.
    Do you know any *free* and simple log viewer which could do that ?

  2. Name Says:

    “I’m trying to view my Apache logs, old ones which are gzipped, and it won’t open them.
    Do you know any *free* and simple log viewer which could do that ?”

    use gunzip to manually unzip them and then read them manually with gedit, vim, or something else?

    please add a contact address to your comment in the future because I would be surprised if you still read this particular page this long after posting the question.

  3. vivek Says:

    zless /path/to/apache/access.log.gz
    zmore /path/to/apache/access.log.gz
    zgrep /path/to/apache/access.log.gz

    See this tip for more information

Leave a Reply

We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Tags: , , , , , ,

Copyright © 2006-2008 nixCraft. All rights reserved - TOS/Disclaimer - Privacy policy - Powered by Open source software.