On Red Hat-based systems, you generally need the vim-common package.
You should see output similar to xxd 2023-08-25 by Juergen Weigert . Common Alternatives to xxd
: If you have Python installed, you can use a one-liner.
MacOS usually comes with xxd pre-installed as part of the system's Vim distribution. If you are seeing "command not found," your PATH might be broken, or you may be using a very stripped-down environment. The easiest fix is to install it via : brew install vim Use code with caution.
Usage: python3 -c "import sys; print(sys.stdin.read().hex())" < filename
In Arch, xxd is included in the base vim package or as a standalone via xxd . sudo pacman -S xxd Use code with caution. How to Fix it on macOS
If you cannot install packages on your current system, you can often use these built-in alternatives to achieve similar results: : Usually available on almost all Unix-like systems. Usage: hexdump -C filename od (Octal Dump) : A POSIX standard tool. Usage: od -t x1 filename
sudo apt update sudo apt install xxd # If the above fails, try: sudo apt install vim-common Use code with caution. CentOS / RHEL / Fedora / AlmaLinux