Category: Linux Terminal

Added: 16th of October 2019

Viewed: 1165 times

Where are the log files located in Linux

Anything that happens on your system is logged and written to a log file. Log files are stored in the following directory

/var/log


Log files are just like standard text files and end with the extension .log. Because they are like text files, log files can be viewed through a standard text editor locally, or through the terminal or remotely using putty.

An example might be that you want to check a log file on a remote system by using a graphical terminal program like Putty, where you don't have access to a remote desktop.

Also accessing log files through programs like putty use less resources and is also quicker than using a remote desktop.

To view a log file, open your terminal and enter the following command to view the log directory
cd /var/log

dir




To view a log file in the terminal for example the gufw.log file we can issue the less command in the terminal
less gufw.log










Other Tips & Tutorials

Linux Terminal

Kill multiple processes using the pkill command in Linux

Posted: 5th of January 2021

Views: 721

Linux Terminal

Display free memory using the terminal in Linux

Posted: 17th of December 2020

Views: 675

Linux Terminal

Using mlocate to find files by name, extension using the terminal in Linux

Posted: 27th of November 2020

Views: 595

Linux Terminal

Capture screenshots of websites using cutycapt in different formats using the terminal in Ubuntu and Ubuntu based distributions

Posted: 15th of November 2020

Views: 832

Linux Terminal

Display a calendar in the terminal

Posted: 6th of November 2020

Views: 747

Linux Terminal

Create a simple cronjob in Linux

Posted: 20th of October 2020

Views: 858

Linux Terminal

Create a new folder and file using the mkdir and touch commands using the terminal in Linux

Posted: 16th of August 2020

Views: 805

Linux Terminal

Convert a PDF document to text or html using pdftotext, pdftohtml in Linux using the terminal

Posted: 3rd of August 2020

Views: 1217

Linux Terminal

List files in a directory using the ls command

Posted: 22nd of July 2020

Views: 841

Linux Terminal

How to access HP Linux Imaging and Printing System set up on Ubuntu using the terminal

Posted: 13th of November 2019

Views: 1487