Mcat is a utility for parsing, converting, and previewing various types of content directly from the command line. It supports formats such as images, Markdown, PDF, video, and other files, making it useful for inspecting content without leaving the terminal. This tutorial explains how to install Mcat terminal file viewer on Ubuntu 26.04.
Install Mcat
Get the latest available version from GitHub and assign it to the variable:
MCAT_VERSION=$(curl -s "https://api.github.com/repos/Skardyy/mcat/releases/latest" | grep -Po '"tag_name": "v\K[0-9.]+')
Download and extract the binary into /usr/local/bin:
curl -sSL https://github.com/Skardyy/mcat/releases/latest/download/mcat-v$MCAT_VERSION-x86_64-unknown-linux-gnu.tar.xz \
| sudo tar xJ --strip-components=1 -C /usr/local/bin --wildcards '*/mcat'
Check that Mcat is available by displaying the installed version:
mcat --version
Testing Mcat
A sample image provides a quick way to verify that Mcat is working as expected. Download an example image:
curl -sSo test.jpg https://raw.githubusercontent.com/opencv/opencv/master/samples/data/butterfly.jpg
Pass the downloaded file to Mcat:
mcat test.jpg
If the terminal supports the Kitty Graphics Protocol or iTerm2 inline image protocol, Mcat displays the image directly in the terminal. On terminals without graphics protocol support, Mcat falls back to a text-based representation of the image.
Uninstall Mcat
If the Mcat is no longer needed, remove the installed binary from the system:
sudo rm -rf /usr/local/bin/mcat
Leave a Comment
Cancel reply