-
-
Notifications
You must be signed in to change notification settings - Fork 2
Linux xxd Guide
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to xxd on Linux, covering Arch Linux, CachyOS, and other distributions including hex dump, binary file editing, and data conversion.
Arch/CachyOS:
# Install vim (includes xxd)
sudo pacman -S vimDebian/Ubuntu:
sudo apt install vimFedora:
sudo dnf install vimBasic usage:
# Hexadecimal dump
xxd file.txt
# Shows file in hex formatConvert back:
# Convert hex back to binary
xxd -r hex.txt > output.bin
# -r = reverse (converts hex to binary)Hex output:
# Default hex format
xxd file.txt
# Shows:
# - Offset (hex)
# - Hexadecimal bytes (16 per line)
# - ASCII representationLimit output:
# Limit length
xxd -l 100 file.txt
# -l = length (first 100 bytes)Convert hex:
# Convert hex dump to binary
xxd -r hex.txt > output.bin
# -r = reverse (hex to binary)Plain format:
# Plain hex (no ASCII)
xxd -p file.txt
# -p = plain (hex only, no offset)Check installation:
# Check xxd
which xxd
# Install vim if missing
sudo pacman -S vimThis guide covered xxd usage, hex dump, and binary file conversion for Arch Linux, CachyOS, and other distributions.
- hexdump Guide - Hex dump alternative
- od Guide - Octal dump
- file Guide - File type detection
-
xxd Documentation:
man xxd
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.