Introduction ============ The Log File Navigator, **lnav**, is an advanced log file viewer for the terminal. It provides an :ref:`easy-to-use interface` for monitoring and analyzing your log files with little to no setup. Simply point **lnav** at your log files and it will automatically detect the :ref:`log-formats`, index their contents, and display a combined view of all log messages. You can navigate through your logs using a variety of :ref:`hotkeys`. :ref:`Commands` give you additional control over **lnav**'s behavior for doing things like applying filters, tagging messages, and more. You can then analyze your log messages using the :ref:`sql-ext`. Dependencies ------------ When compiling from source, the following dependencies are required: * `NCurses `_ * `PCRE `_ -- Versions greater than 8.20 give better performance since the PCRE JIT will be leveraged. * `SQLite `_ * `ZLib `_ * `Bzip2 `_ * `Readline `_ Installation ------------ Check the `downloads page `_ to see if there are packages for your operating system. Compiling from source is just a matter of doing: .. prompt:: bash ./configure make sudo make install Viewing Logs ------------ The arguments to **lnav** are the log files, directories, or URLs to be viewed. For example, to view all of the CUPS logs on your system: .. prompt:: bash lnav /var/log/cups The formats of the logs are determined automatically and indexed on-the-fly. See :ref:`log-formats` for a listing of the predefined formats and how to define your own. If no arguments are given, **lnav** will try to open the syslog file on your system: .. prompt:: bash lnav