How to Install viu on Ubuntu: View Images Right in Your Terminal

viu is a compact, fast terminal image viewer written in Rust. It draws images, including animated GIFs, straight into your terminal window, letting you preview a screenshot, inspect a thumbnail or glance at a downloaded picture without opening a separate graphical application or leaving the shell.

The magic is in how it adapts to your terminal. On emulators that support a graphics protocol, such as Kitty or WezTerm, viu shows full-resolution images; everywhere else it falls back to Unicode half-block characters with truecolour, which still yields a genuinely useful picture even across an SSH session. That flexibility makes it as handy on an Ubuntu desktop as on a remote server with no display attached.

Ubuntuโ€™s official archives do not include viu, so the usual alternatives are compiling it with Cargo or downloading release binaries manually. The unofficial deb.griffo.io repository provides an easier path: a prebuilt, up-to-date viu package installable with apt.

Install the Latest viu on Ubuntu: The Short Version

If you only came for the commands, this adds the repository and installs the latest viu .deb package on Ubuntu:

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 $(lsb_release -sc 2>/dev/null) main" | sudo tee /etc/apt/sources.list.d/deb.griffo.io.list > /dev/null
sudo apt update
sudo apt install viu

The rest of this guide explains what each command does, how to verify the install, how to keep viu up to date, and what to check when something goes wrong.

What Makes viu Special?

  • ๐Ÿ–ผ๏ธ Inline image rendering - Shows PNG, JPEG, WebP, BMP and more directly in the terminal
  • ๐ŸŽž๏ธ Animated GIF playback - Plays GIFs frame by frame with control over loops and speed
  • ๐Ÿš€ Written in Rust - Quick to start and packaged as a small static binary
  • ๐Ÿฑ Reads from stdin - Accepts piped image data, perfect for scripts and pipelines
  • ๐Ÿ“ Flexible sizing - Fit to width, height or exact dimensions via simple flags
  • ๐ŸŒˆ Graphics-protocol aware - Kitty/iTerm graphics where possible, Unicode blocks as fallback
  • ๐Ÿ“ Multiple files and directories - View a list of images or recurse into a folder
  • ๐Ÿ” Transparency handling - Keeps alpha channels intact when the terminal supports it

Why Use the deb.griffo.io Repository?

On Ubuntu, installing viu from deb.griffo.io provides:

  • Easy installation and updates through the APT package manager
  • Automatic dependency management handled by the packaging
  • Always tracks upstream releases so you get the newest viu
  • No compiling from source and no need for a Rust toolchain
  • Works across supported Ubuntu releases with the codename detected automatically

Prerequisites

Before you begin, make sure you have:

  • An Ubuntu system (Jammy 22.04 LTS, Noble 24.04 LTS, or newer)
  • sudo privileges
  • curl installed (install with sudo apt install curl if needed)
  • A terminal with truecolour support for the best rendering

Step 1: Add the deb.griffo.io Repository

Add the repository key and source to your system:

# Create the keyrings directory
sudo install -d -m 0755 /etc/apt/keyrings

# Download and install the repository GPG key
curl -fsSL https://deb.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | sudo gpg --dearmor --yes -o /etc/apt/keyrings/deb.griffo.io.gpg

# Add the repository (auto-detects your distro codename)
echo "deb [signed-by=/etc/apt/keyrings/deb.griffo.io.gpg] https://deb.griffo.io/apt $(lsb_release -sc 2>/dev/null) main" | sudo tee /etc/apt/sources.list.d/deb.griffo.io.list > /dev/null

# Update the package list
sudo apt update

Here is what each command does:

  1. Keyrings directory: Creates /etc/apt/keyrings with the correct permissions.
  2. GPG key: Downloads and de-armours the signing key so APT can verify packages.
  3. Repository: Adds the source line, with lsb_release -sc filling in your Ubuntu codename such as noble.
  4. Update: Reads the new metadata so the packages become available.

Step 2: Update the Package List

If you did not run the last command above, run it now:

sudo apt update

Step 3: Install viu

Install the package:

sudo apt install viu

APT downloads the latest packaged viu and installs it along with any dependencies.

Step 4: Verify the Installation

Confirm the version:

viu --version

Expected output:

viu 1.5.1

Getting Started with viu

viu is a single-purpose command: give it an image and it renders it in the terminal. The sections below walk through piping, sizing, animations and everyday viewing.

Pipe Images from Other Commands

One of viuโ€™s most useful tricks is reading from standard input, so it slots into pipelines. Use - as the filename:

# View an image fetched with curl, without saving it first
curl -fsSL https://example.com/logo.png | viu -

# Preview whatever image you pick with fzf
viu "$(ls *.png | fzf)"

View One or More Images

Of course, you can just pass file paths directly:

# A single image
viu photo.png

# Several at once
viu one.png two.jpg three.webp

Add -n to label each image with its filename:

viu -n *.png

Set the Size

viu fits images to the terminal width by default. Constrain the dimensions when you need to:

# Fit to a width of 80 columns
viu -w 80 photo.png

# Fit to a height of 40 rows
viu -h 40 photo.png

# Exact dimensions (aspect ratio may change)
viu -w 100 -h 50 photo.png

Play Animated GIFs

viu loops GIFs by default until you press a key. Adjust the playback as needed:

# Play once and stop
viu -1 animation.gif

# Custom frame rate
viu -f 15 animation.gif

# First frame only, as a still
viu -s animation.gif

Browse a Directory

Point viu at a folder with -r to walk through the images inside:

viu -r ./screenshots/

Keeping viu Updated

Since viu is installed from the repository, it updates with the rest of Ubuntu:

sudo apt update && sudo apt upgrade

Other Tools from deb.griffo.io

The deb.griffo.io repository packages many other terminal utilities that complement viu:

  • Yazi - A blazing fast terminal file manager with image previews
  • Termusic - A terminal music player written in Rust
  • Fastfetch - A fast, highly customizable system information tool
  • eza - A modern, maintained replacement for ls

Troubleshooting

GPG or Key Issues

If APT reports the repository signature cannot be verified, re-import the key:

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
sudo apt update

Package Not Found

If APT cannot locate the viu package:

  1. Re-run sudo apt update after adding the repository.
  2. Confirm your Ubuntu release is supported (Jammy, Noble or newer).
  3. Inspect the source line: cat /etc/apt/sources.list.d/deb.griffo.io.list.

Images Render as Blocks or Colours Look Off

If viu produces coarse blocks or wrong colours, the terminal, not viu, is usually the limiting factor:

  1. Use a truecolour terminal and verify it: echo $COLORTERM should print truecolor.
  2. For full-resolution output, choose a terminal with a graphics protocol such as Kitty or WezTerm.
  3. Inside tmux or screen, graphics protocols are frequently swallowed, so viu falls back to Unicode blocks; run it outside the multiplexer for the sharpest result.

Uninstalling

To remove viu:

sudo apt remove viu

To also remove the repository configuration:

sudo rm /etc/apt/sources.list.d/deb.griffo.io.list
sudo rm /etc/apt/keyrings/deb.griffo.io.gpg
sudo apt update

Conclusion

viu earns its place in a terminal-centric workflow by removing a small but constant friction: needing a graphical viewer just to look at an image. Previewing a screenshot over SSH, checking a download without a browser, or glancing at a GIF from a script all become one quick command. On Ubuntu the deb.griffo.io repository makes installation a single apt install, with updates carried along by your normal upgrades.

From a Kitty window on the desktop to a headless production box, viu makes the terminal a competent image viewer. Pair it with a file manager or a fuzzy finder and you rarely need to reach for the mouse again.

Frequently Asked Questions

How do I install the latest viu on Ubuntu?

Add the deb.griffo.io APT repository and its signing key, then run sudo apt install viu. The repository tracks upstream viu releases, so you get the latest packaged version rather than a build frozen when your distribution was released.

Is there a .deb package for viu?

Yes. deb.griffo.io publishes viu as a signed .deb for Ubuntu. You could download that .deb and install it by hand, but adding the repository is the better option: APT then resolves dependencies and picks up new versions on its own.

How do I update viu to the latest version?

Run sudo apt update && sudo apt upgrade. Once viu is installed from APT there is no separate updater to remember, since new releases arrive with the rest of your system updates.

How do I install viu on Debian?

Exactly the same way; lsb_release -sc simply resolves to a different codename. There is a companion guide with the Debian specifics: How to install viu on Debian.

Which Ubuntu releases are supported?

Jammy 22.04 LTS, Noble 24.04 LTS and newer. Because the repository line is built from lsb_release -sc, the matching suite is selected for you.

Resources


Disclaimer: The deb.griffo.io repository is an unofficial community project and is not affiliated with the official Debian or Ubuntu projects, or with the upstream viu project.