On Arch-based systems, xxd is part of the vim package.

xxd firmware.bin | head

brew install vim

The xxd utility is historically part of the text editor distribution. Most full-featured Linux distributions include Vim (and thus xxd ) out of the box. However, you might encounter this error if:

echo "Hello World" | xxd

On Debian-based systems, xxd is usually bundled with the vim-common package. You can install it using:

If you are in a restricted environment and cannot install new packages, you can often achieve similar results using hexdump or od (Octal Dump), which are part of bsdmainutils or coreutils and are more likely to be present: hexdump -C filename