⚡ 68 developer tools, always updated, new upstream releases land in apt within hours. Join the Discord

🎁 The apt mirror needs a subscription. Try every tool free for 14 days, no card needed. See pricing · 🆓 There is an always-free mirror · 🔐 apt returning 401?

🪵 Install Latest lnav on Ubuntu

The Logfile Navigator, a terminal log viewer with SQL queries

Latest version: 0.14.1 · updated 2026-11-05
SourceVersion
deb.griffo.io0.14.1 ✅
Official Ubuntu0.13.2 🛑
← Back to home

What is lnav?

lnav, the Logfile Navigator, is a log viewer for the terminal that merges log files from many sources into one view ordered by timestamp. Point it at a few files, a directory or a compressed archive and it works out the formats by itself (syslog, the systemd journal, Apache and nginx access logs, JSON lines and many more), interleaves the messages by time, colours errors and warnings so they stand out, and keeps following the files as they grow. From there you filter, search, jump between errors, and when a question needs more than a search, you query the log messages with SQL. It opens remote logs over ssh as easily as local ones. lnav is written in C++ by Tim Stack and is BSD-2-Clause licensed.

🚀 Why Latest Versions Matter: lnav keeps gaining formats, SQL functions and viewer features, and each release fixes how particular logs are parsed. Ubuntu 26.04 is frozen at lnav 0.13.2, Noble at 0.11.2 and Jammy at 0.9.0, so a stock system misses the current release and the formats and fixes that came with it. This repository ships lnav 0.14.1 under the same package name, so it replaces the distribution's lnav in place on the next apt upgrade.

⚡ Key Features of lnav

🔀 One Merged Timeline

Open the syslog, an application log and a web server log together and lnav interleaves their lines by timestamp, so you read what happened across the whole system in the order it happened.

🔍 Automatic Format Detection

syslog, journald JSON, Apache and nginx access logs, JSON lines, logfmt and dozens more are recognised without configuration; levels, timestamps and fields are parsed, and errors and warnings are highlighted.

🗄️ SQL over Your Logs

Every recognised format is a table. Press ; and run SELECT queries against the log messages: count errors per host, find the slowest requests, group status codes, with the results shown in the same window.

🌐 Remote Logs over ssh

lnav user@host:/var/log/syslog opens a log on another machine through your normal ssh setup and keys, with no agent to install on the server.

📦 Compressed Files and Archives

Rotated .gz and .bz2 logs open directly, and so do .zip and .tar archives, so a support bundle can be read without unpacking it first.

👀 Follow, Filter and Search

Files are tailed as they grow, filters hide or keep lines by pattern, searches highlight every match, and single keys jump to the next error or warning, so nothing important scrolls past.

🚀 Always ahead of the official archives: Debian and Ubuntu freeze package versions when a release ships. This repository publishes new upstream releases typically within hours. A simple apt upgrade keeps you on the latest version.

📦 Installation from deb.griffo.io

Run the commands

Step 1: Add Repository

sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://deb.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | sudo gpg --dearmor --yes -o /etc/apt/keyrings/deb.griffo.io.gpg
echo "deb [signed-by=/etc/apt/keyrings/deb.griffo.io.gpg] https://deb.griffo.io/apt $(. /etc/os-release; echo ${DEBIAN_CODENAME:-${UBUNTU_CODENAME:-$VERSION_CODENAME}}) main" | sudo tee /etc/apt/sources.list.d/deb.griffo.io.list > /dev/null
sudo apt update
install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://deb.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | gpg --dearmor --yes -o /etc/apt/keyrings/deb.griffo.io.gpg
echo "deb [signed-by=/etc/apt/keyrings/deb.griffo.io.gpg] https://deb.griffo.io/apt $(. /etc/os-release; echo ${DEBIAN_CODENAME:-${UBUNTU_CODENAME:-$VERSION_CODENAME}}) main" | tee /etc/apt/sources.list.d/deb.griffo.io.list > /dev/null
apt update

🆓 There is an always-free mirror. deb-free.griffo.io serves packages free forever, no account, no subscription, at most 2 months behind upstream, security fixes immediately. It currently carries cliamp, Ghostty, lazydocker, Oh My Posh, Uncloud and Zed; lnav is not one of them, so the repository above is the only way to get it today, ask and it can be enrolled.

How the free mirror works →

Step 2: Install lnav

# Install latest lnav (replaces the distribution's older lnav in place)
sudo apt install lnav

# Verify installation
dpkg -s lnav | grep Version
# Install latest lnav (replaces the distribution's older lnav in place)
apt install lnav

# Verify installation
dpkg -s lnav | grep Version

Step 3: First run

# Logs under /var/log are readable by root and the adm group
sudo lnav /var/log

# Or read the systemd journal as JSON, with every field parsed
journalctl -o json | lnav

# Your own logs need no sudo; formats are detected
lnav ~/app/logs/

# Press ? inside lnav for the built-in help, q to quit
# Logs under /var/log are readable by root and the adm group
lnav /var/log

# Or read the systemd journal as JSON, with every field parsed
journalctl -o json | lnav

# Your own logs need no sudo; formats are detected
lnav ~/app/logs/

# Press ? inside lnav for the built-in help, q to quit

🎯 Basic Usage Examples

Reading and following logs:

# Rotated and compressed logs open directly, as do archives
lnav /var/log/nginx/access.log.2.gz support-bundle.tar.gz

# Several sources, merged into one timeline by timestamp
lnav /var/log/nginx/ ~/app/logs/app.log

# A log on another machine, over your normal ssh setup
lnav user@host:/var/log/syslog

Filtering and SQL:

# Inside lnav: e / E jump to the next / previous error, w / W to warnings
# :filter-in error         keep only matching lines
# :filter-out healthcheck  hide matching lines
# ;SELECT c_ip, count(*) AS hits FROM access_log GROUP BY c_ip ORDER BY hits DESC

# The same query without the interface, for scripts
lnav -n -c ';SELECT sc_status, count(*) FROM access_log GROUP BY sc_status' /var/log/nginx/access.log

Keeping it current:

# lnav updates with the rest of the system
sudo apt update && sudo apt upgrade

# Which version is installed, and which is the newest available
apt policy lnav

# Remove it again
sudo apt remove lnav
# lnav updates with the rest of the system
apt update && apt upgrade

# Which version is installed, and which is the newest available
apt policy lnav

# Remove it again
apt remove lnav

🔧 Tool Integrations

lnav reads whatever produces text, from files, from pipes and from other machines:

  • ssh: remote paths like user@host:/var/log/syslog go through your existing ssh config and keys; the package recommends openssh-client for this
  • systemd journal: pipe journalctl -o json (add -f to follow) into lnav and every journal field becomes searchable and queryable
  • Containers: docker logs -f app 2>&1 | lnav or kubectl logs -f pod | lnav gives container output the same highlighting and SQL
  • Clipboard: mark lines and press c to copy them; the package suggests wl-clipboard or xclip for Wayland and X11
  • Custom formats: describe an in-house log format in a JSON file and install it with lnav -i myformat.json; it then gets detection, highlighting and its own SQL table
  • Scripts and CI: lnav -n -c runs commands and queries headless, so the same SQL that answers a question interactively can run in a cron job or a pipeline
  • Documentation: the man page comes with the package (man lnav), and the full manual is at docs.lnav.org

🚀 Why Choose deb.griffo.io?

📊 Repository Comparison:
  • Official Ubuntu: ships lnav 0.13.2 in 26.04, 0.11.2 in Noble and 0.9.0 in Jammy, each frozen for the life of its release
  • Upstream downloads: a zip with a static binary on the GitHub releases page, copied into your PATH by hand, without the man page, and fetched again for every release
  • Building from source: a C++ toolchain plus the SQLite, PCRE2, ncurses, libarchive and libcurl development packages, and a long compile
  • deb.griffo.io: latest version with automatic updates

📦 Package Build Repository

The Ubuntu packages are automatically built and maintained in this GitHub repository:

🔗 Related Packages

Also available from deb.griffo.io:

🎯 Perfect for: system administrators and SREs chasing an incident across several services, developers reading application logs next to the web server's, anyone who answers log questions with grep, sort and uniq and would rather write one SQL query, and people who need to read logs on servers they can only reach over ssh.

💝 Support This Project

If this repository saves you time and effort, please consider supporting it!

⭐ Star on GitHub 🐦 Share on Twitter

Just after the command? See apt install lnav, one page covering Debian and Ubuntu.

📦 Recent releases from this repository

📚 Release-specific install guides

❓ Frequently asked questions

Is lnav in the official Ubuntu repositories?

Yes, but the official Ubuntu archive ships lnav 0.13.2, while this repository serves lnav 0.14.1, rebuilt within hours of each upstream release.

How do I install the latest lnav on Ubuntu?

Add the deb.griffo.io repository once using the instructions above, then run: sudo apt install lnav. New releases arrive through the normal sudo apt upgrade.

Are the packages signed and how are they built?

Every package is signed with the repository's GPG key (EA0F721D231FDD3A0A17B9AC7808B4DD62C41256) and built from upstream releases in public GitHub packaging repositories that anyone can inspect.

Which Ubuntu releases are supported?

Ubuntu 22.04 Jammy, 24.04 Noble, 25.10 Questing and 26.04 Resolute.

Start your 14-day free trial

Enter your email and we will send your apt credentials within minutes. No card needed.

This becomes your apt login. If you stay, pay with the same address and nothing on your machines changes.

One trial per email address. Two days before it ends we email you a link to keep access. If you do nothing, access stops and nothing is charged.