macOS typically includes xxd by default via the Xcode Command Line Tools. If it is missing, you can install it using , the most popular package manager for Mac. Open your Terminal. Install xxd via Homebrew: brew install xxd Use code with caution.
choco install xxd
On Debian-based systems, xxd is often packaged within vim-common .
If you cannot install packages, use these CLI workarounds: xxd command not found
sudo apt install vim-common
The issue is caused by the absence of the Vim package. Installing vim or vim-common via the system's package manager is the definitive fix.
Red Hat-based distributions bundle xxd inside the core vim-enhanced package. sudo dnf install vim-enhanced Use code with caution. For CentOS 7 and older: sudo yum install vim-enhanced Use code with caution. Arch Linux macOS typically includes xxd by default via the
If you are on a restricted system where you cannot install packages (like a locked-down production server), you can use built-in alternative tools to view hex data. Using od (Octal Dump)
To see a hex dump of a file named example.bin :
On many Linux systems, xxd is bundled as part of the vim text editor package rather than as a standalone tool. If Vim is not installed, xxd will be missing. Install xxd via Homebrew: brew install xxd Use
After running the appropriate installation command for your operating system, verify that the system can now locate the binary. Check the installed version: xxd -v Use code with caution. Check the binary path location: which xxd Use code with caution.
sudo yum install vim-common