Where I found log file in linux?

Asked By 20 points N/A Posted on -

Hi , I need to know about log of any activities in Linux OS, is it possible?

Please reply me.

Best Answer by Carl Jack
Answered By 10 points N/A #134006

Where I found log file in linux?


Hi Williams,

In Linux operating system this is very much possible to track every events in log files.

You have all system log file in same directory name /var/log.

You can find different log files and log directories in there, boot.log, mail, cron, httpd, maillog etc.

Here a helpful command you get to see system log is

[email protected]:~#  dmesg | less

Mr Joseph Clark

Best Answer
Best Answer
Answered By 5 points N/A #134007

Where I found log file in linux?


Hello Meagan,

In Linux, close to all log files are in the following folder location: /var/log directory (and subdirectory).

But it is still possible to change to this directory using cd command in case the files are not in this folder.

Note that you will need to be the root user to successfully do that.

You can be able to use less, more, as well as the cat or tail command in order to see the logs.

You will just need to d the following:

  • Go to /var/logs directory:# cd /var/logs
  • And then view common log file /var/log/messages using any one of the following command:

    • # tail -f /var/log/messages
    • # less /var/log/messages
    • # more -f /var/log/messages
    • # vi /var/log/messages



Login/Register to Answer

Related Questions