• 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 604 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 (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

  • Is it Good to Run Apache Web server and MySQL Database on Separate Cloud Servers? March 27, 2023
  • Advantages of Cloud Server Over Dedicated Server for Hosting WordPress March 26, 2023
  • Get Audiophile-Grade Music on Your Smartphone March 25, 2023
  • Simple Windows Security and Privacy Checklist for 2023 March 24, 2023
  • 7 Best Artificial Intelligence (AI) Software March 24, 2023

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, March 28, 2023, https://thecustomizewindows.com/2016/06/install-log-file-navigator-lnav/.

Source:The Customize Windows, JiMA.in

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

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT