• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here: Home » How to Install Log File Navigator lnav (Ubuntu 16.04)

By Abhishek Ghosh June 13, 2016 7:37 am Updated on June 13, 2016

How to Install Log File Navigator lnav (Ubuntu 16.04)

Advertisement

Obviously, we can use cat, tail, grep commands with or without unix pipe for normal works. But there are command line tool name lnav to colorize the output. It has built-in log message parser can automatically discover and extract interesting data from plainly formatted log messages. Here is How to Install Log File Navigator lnav on Ubuntu 16.04. lnav is a Command Line Tool with ncurses Text Based User Interface (TUI) to Check the /var/log files. Checking of Nginx, PHP-FPM Logs like works becomes easier.

lnav has histogram view, filters, live operation, automatic tailing, ordering of lines, syntax highlighting, search, hotkeys etc.

 

How to Install Log File Navigator lnav (Ubuntu 16.04)

 

Installing log file navigator lnav on Ubuntu 16.04 is just easy. There is Apt package and corresponding manual page :

Advertisement

---

Vim
1
2
http://manpages.ubuntu.com/manpages/xenial/man1/lnav.1.html
https://raw.githubusercontent.com/tstack/lnav/master/src/help.txt

We simply need to run :

Vim
1
apt install lnav

and rest will be automatically done. There is another tool named ccze. ccze colorizes logs which are sent to standard out, we can use tail to follow a log file and then prettify. It is not exactly so great. lnav has lot of features :

Vim
1
2
3
4
5
6
http://tstack.github.io/lnav/
http://lnav.org/features/
http://lnav.readthedocs.io/en/latest/index.html
http://lnav.readthedocs.io/en/latest/formats.html
http://lnav.readthedocs.io/en/latest/hotkeys.html#hotkeys
http://lnav.readthedocs.io/en/latest/commands.html#commands

Documentation is not easy to find.

 

How to Install Log File Navigator lnav : Usage

 

q quits the program’s interface.

lnav -s command loads /var/log/syslog.

lnav /var/log command loads all of the files in /var/log/dpkg.log.

To see the output with timestamps perpended we can use unix pipe and process with -t flag i.e. lnav -t.

As an example, take we have to check the logs on a server with Nginx, PHP-FPM installed. For simple access.log viewing, we can use :

Vim
1
lnav /var/log/nginx/access.log

To view the errors, we can use :

Vim
1
lnav /var/log/nginx/error.log.1

For complicated matter, like checking log for XML-RPC attack (which usually gives PHP-FPM error), instead of :

Vim
1
awk '{print $9}' /var/log/nginx/access.log | sort | uniq -c | sort -rn

so much not needed with lnav :

Vim
1
lnav /var/log/nginx/access.log

hit / key, then type 200. It will show 8 hits. Type q hit Enter key, again q hit Enter key to exit.

How to Install Log File Navigator lnav (Ubuntu 16-04)

 

But OS X iTerm2 Not Giving Colors Like That of Your Screenshoot Shown?

 

If you are using OS X iTerm2 with Homebrew, then you may search our website with iTerm2 for configurations. In short, you will do small thing :

[iTerm2] > Preference > Profiles > Colors > Smart cursor colors (checked), adjust minimum contrast to around 50%.

Also, you can try :

[iTerm2] > Preference > Profiles > Window > set Transparency to 0% temporarily.

Tagged With install file to navigator , ubuntu lnav install

This Article Has Been Shared 375 Times!

Facebook Twitter Pinterest
Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to How to Install Log File Navigator lnav (Ubuntu 16.04)

  • Install WordPress on Rackspace Cloud Server (Ubuntu 14.04) Video

    This is a video guide to Install WordPress on Rackspace Cloud Server (Ubuntu 14.04) as a companion with our step by step commands in easy way.

  • Advanced Tweaks and Optimization for Varnish Cache

    Varnish Cache usually works the best out of the box. However, minimum tweaks and optimization can make Varnish to work better with WordPress.

  • Comparison of Rackspace, DigitalOcean and Amazon IaaS

    We test all the existing cloud computing services without affiliate link. We definitely can compare Rackspace, DigitalOcean and Amazon IaaS.

  • Rackspace Cloud Hosting Cost and Tips for Reduced Bill

    Rackspace Cloud Hosting Billing Part is Clean. Cost is Predictable and If You Follow Our Tips, You Can Cut Your Cost to Minimum as Possible.

  • Software Defined Storage and Future of Physical Storage

    Software Defined Storage can be seen as the evolution that marks the end of traditional storage systems using virtual storage technology. In the previous articles, we have talked about What is Software Defined Storage (SDS), Characteristics of Software Defined Storage (SDS) and Software Defined Storage Virtualization. In this article, we will discuss about Software Defined […]

Additionally, performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (22.1K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Why Data Management is so Important in a Business July 6, 2022
  • Application Modernization : Cloud Can Take Your Applications to the Next Level July 5, 2022
  • Ways To Make Sure Your Online Course Outshine Others July 3, 2022
  • Will Smart Factories Become the New Assembly Line? July 2, 2022
  • The Cost of Doing Business as a Handyman July 1, 2022

About This Article

Cite this article as: Abhishek Ghosh, "How to Install Log File Navigator lnav (Ubuntu 16.04)," in The Customize Windows, June 13, 2016, July 7, 2022, https://thecustomizewindows.com/2016/06/install-log-file-navigator-lnav/.

Source:The Customize Windows, JiMA.in

This website uses cookies. If you do not want to allow us to use cookies and/or non-personalized Ads, kindly clear browser cookies after closing this webpage.

Read Privacy Policy.

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

Copyright © 2022 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy