Install hexyl on Ubuntu 20.04

Install hexyl on Ubuntu 20.04

The hexyl is a hex viewer via command line. This tool uses colors to distinguish between categories of bytes (printable ASCII characters, whitespace characters, NULL bytes, and other).

This tutorial demonstrates how to install hexyl on Ubuntu 20.04.

Install hexyl

Run the following command to get the latest version tag of hexyl release and assign version tag to variable:

HEXYL_VERSION=$(curl -s "https://api.github.com/repos/sharkdp/hexyl/releases/latest" | grep -Po '"tag_name": "v\K[0-9.]+')

Download Debian package (.deb) from releases page of the hexyl repository:

curl -Lo hexyl.deb "https://github.com/sharkdp/hexyl/releases/latest/download/hexyl_${HEXYL_VERSION}_amd64.deb"

Install hexyl:

sudo apt install -y ./hexyl.deb

When installation is finished, we can check hexyl version:

hexyl --version

Remove unnecessary .deb file:

rm -rf hexyl.deb

Testing hexyl

Create a text file:

echo "Hello world" > test.txt

Run the hexyl command and provide file path as argument:

hexyl test.txt
hexyl usage on Ubuntu

Uninstall hexyl

If hexyl is no longer needed, you can remove it using the following command:

sudo apt purge --autoremove -y hexyl

Leave a Comment

Cancel reply

Your email address will not be published.