April 25, 2019

Basic Linux Tips and Tricks, Part 2 - page 2

Finding Solutions

  • October 8, 2007
  • By A. Lizard

What if there wasn't an error message when the application crashed or the program wouldn't run if installed?

Your computer keeps log files for main system functions and separate logs for many of its applications. The ones you'll usually want are the last parts of the logs with the error messages that just preceded whatever trouble your computer is in.

Finding stuff in the logs isn't hard--you can find most of the the application logs in the /var/log directory.

alizard@terrarium:/var/log$ ls -al
total 10156
drwxr-xr-x 18 root        root       4096 2007-07-26 11:01 .
drwxr-xr-x 16 root        root       4096 2007-02-26 21:10 ..
-rw-r-----  1 root        root       4396 2007-07-26 14:42 acpid
-rw-r-----  1 root        root       1778 2007-07-22 11:37 acpid.1.gz
-rw-r-----  1 root        adm       77168 2007-07-26 18:45 auth.log
-rw-r-----  1 root        adm      156786 2007-07-23 11:05 auth.log.0

Some of the entries are directories, find the related logs inside. When you see a numbered log extension, like auth.log , the most recent will be auth.log , the next most recent will be .log.0, .log.1, and so on. What you will be looking for is error messages, particularly if a sequence is interrupted before completion. If one has a video problem, the error messages will either be in xorg.0.log or messages. If the file extension is .gz , you can open it with

$ gunzip filename.gz

then cd filename to open the directory it unzips to).

To open from the GUI, use Konqueror as a directory manager, go to /var/log and click on the filename, the linked archive manager should open it.

Some logs will be under the application directories rather than in /var/log.

Most Popular LinuxPlanet Stories