• 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
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)

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • Join/Merge Multiple Log Files For Big Data Analysis

    Here Are The Ways To Join/Merge Multiple Log Files For Big Data Analysis, Store Them To OpenStack Based Cloud Storage And Delete Old Files.

  • WordPress Multisite on Nginx on Ubuntu 14.04 on HP Cloud

    Here is a Step by Step Guide on Setting Up WordPress Multisite on Nginx on Ubuntu 14.04 on HP Cloud with All Commands and the Configuration.

  • Steps To Install Nginx Plus on Ubuntu Server (HP Cloud)

    Here Are the Steps To Install Nginx Plus on Ubuntu Server Running on HP Cloud. Nginx Plus is the Paid Version of Nginx with Extra Features.

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 (24.3K 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

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

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

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