LinTut

Install and use Log File Navigator – lnav in Ubuntu and CentOS linux

lnav example screen

lnav example screen

The Log File Navigator, lnav, is an enhanced log file viewer that takes advantage of any semantic information that can be gleaned from the files being viewed, such as timestamps and log levels. Using this extra semantic information, lnav can do things like interleaving messages from different files, generate histograms of messages over time, and providing hotkeys for navigating through the file. It is hoped that these features will allow the user to quickly and efficiently zero in on problems.
In this article we will show you how to install and use The Log File Navigator, lnav, on Ubuntu 15.04/15.10/ and CentOS 7.x

Install lnav on Ubuntu 15.04/15.10 and Linux Mint 17.x

To install lnav on Ubuntu 15.04/15.10 and Linux Mint 17.x and other Ubuntu based distribution, type following command in your terminal:

$ sudo apt-get install lnav -y

Install lnav on CentOS 7

First, enable epel repository:

$ sudo yum install epel-release -y

Now, install lnav using yum command:

$ sudo yum install lnav -y

Using lnav command

If you want to view logs using lnav you can do using the following command by default it shows syslogs.

$ lnav
Use lnav log viewer

If you want to view specific logs provide the path. Example:

$ lnav /var/log/clamav/
lnav view specific logs

How to navigate in lnav


For more information visit official lnav site.

Exit mobile version