If successful, which xxd will output the file path (such as /usr/bin/xxd ), and the version command will display the program details. Quick Alternatives to xxd
The message xxd: command not found (or variations like bash: xxd: command not found or The term 'xxd' is not recognized... ) has a straightforward cause:
To view a file in actual binary digits (1s and 0s) instead of hexadecimal, use the -b (bits) option. xxd command not found
The od command is part of the POSIX standard and is almost always pre-installed on every Linux and Unix flavor. od -tx1 -c filename Use code with caution. Use hexdump Another ubiquitous utility on Linux utilities is hexdump . hexdump -C filename Use code with caution. Summary of Fixes Operating System Command to Fix sudo apt install xxd or sudo apt install vim Fedora / RHEL sudo dnf install vim-common Arch Linux sudo pacman -S xxd Alpine Linux apk add xxd macOS brew install vim
it means the shell cannot locate the xxd binary in any of the directories listed in your $PATH environment variable. If successful, which xxd will output the file
sudo apt update sudo apt install xxd
You should see something like:
sudo yum install vim-common
Mac operating systems usually come with xxd pre-installed alongside the system's default text editors. However, if you are using a clean shell environment or a highly customized setup and find it missing, you can install it via Homebrew. First, ensure you have Homebrew installed, then run: brew install vim Use code with caution. The od command is part of the POSIX
xxd binary > binary.hex # Edit binary.hex with a text editor xxd -r binary.hex binary
On Windows, you have a couple of pathways to get xxd working.