Up to $140 off-Lowest  Prices of 2024(Nov.21-Dec.2)

My Computer Tips

Home | About | Categories | All Tips & Tutorials

Where are the log files located in Linux

ID: 136

Category: Linux Terminal

Added: 16th of October 2019

Views: 2,423

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