Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

So, if there is some problem with my computer, be it hardware or software, what are the major log files and where are they located?

Also, is there a generic location where log files of the other packages might be located?

share|improve this question
    
Possibly relevant: askubuntu.com/questions/5868/… –  Jeremy Stein Sep 11 '12 at 18:51
add comment

3 Answers

up vote 23 down vote accepted

All log files are located in /var/log directory. In that directory, there are specific files for each type of logs. For example, system logs, such as kernel activities are logged in syslog file.

Some of the most common log files in that directory is :

  • In directory apt there is a file history.log which saves all the package installation and removal information even the initial system build as Live CD. You can open this file to see this very interesting file.

  • In directory dist-upgrade there is a file apt.log which logs the information during distribution upgrades

  • In directory installer the log files which are created during installation can be found.

  • There is an apport.log file which saves information about crashes in your system and reporting them.

  • The file auth.log includes information about the authentication activities such as when you authenticate as root user via sudo.

  • The file dpkg.log saves the low level details of package installation and removal related with dpkg. You might be aware that the apt system depends on dpkg for package installation and removal.

  • boot.log includes information of each booting.

  • kern.log saves kernel information such as warnings, errors etc.

  • alternatives.log includes the history of all the alternatives set by various packages and their removal via update-alternatives command.

  • Another important log file is Xorg.log which include information about the graphics driver, its failures, warnings etc.

Some other types of Log files may be there depending on your installed packages. For example, My system also includes a log files epoptes.log which will only be there if you install epoptes package.

share|improve this answer
add comment

In the screenshot below most of the important logs from /var/log are shown. In that location there are often other folders from other applications such as samba or apache2 if you have it installed.

To watch a log in real time you can use gnome-system-log or, for example, use

 tail -f /var/log/kern.log

All logs can be analysed more easily either with the filter option in gnome-system-log or by using grep to search for a particular term. For example, if I wanted to find references to my SiS hardware, I could enter:

grep -i SiS /var/log/kern.log

Most of the logs in the screenshot are self-explanatory, however, here's a few quick notes:

  • auth.log deals with all privileged actions such as when you use sudo in the terminal or run gui programs such as synaptic.
  • kern.log records all kernel activity and can be useful for diagnosing errors with hardware.
  • dpkg.log is a very detailed account of packages installed
  • syslog contains both information from the kernel and OS information
  • xorg.log contains information on the (largely automatic) setup of your display
  • udev is particularly useful as it contains some details about the setup of hardware that could be useful to record for the future.
  • history.log (as seen in the screenshot) is from /var/log/apt and contains the history of your updates and installations.

enter image description here

share|improve this answer
    
My System Log Viewer only shows me Xorg.0.log, auth.log, dpkg.log, mail.log and syslog. How can I see the remaining ones? –  green7 Sep 10 '12 at 19:31
    
@green7 You can add any log you want- go to file > open and then navigate in the filesystem to /var/log and select the log to open and repeat for any other logs. –  user76204 Sep 10 '12 at 19:36
    
Got it! Thanks! –  green7 Sep 10 '12 at 19:39
add comment

To view system and application logs, you can use the "Log File Viewer" application. Hit F2 to open your dash, then type log and select the Log File Viewer application.

More information: http://www.howtogeek.com/117878/how-to-view-write-to-system-log-files-on-ubuntu/

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.