-
-
Notifications
You must be signed in to change notification settings - Fork 1
Linux hexdump Guide
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to hexdump on Linux, covering Arch Linux, CachyOS, and other distributions including hexadecimal dump, binary data inspection, and file analysis.
Basic usage:
# Hexadecimal dump
hexdump file.txt
# Shows file in hexadecimal formatCanonical hex:
# Canonical format
hexdump -C file.txt
# -C = canonical (standard hex dump format)Hex output:
# Default hex format
hexdump file.txt
# Shows:
# - Offset (hex)
# - Hexadecimal bytes
# - ASCII representationStandard format:
# Canonical format
hexdump -C file.txt
# Shows:
# - Offset
# - Hex bytes (16 per line)
# - ASCII representationDecimal address:
# Decimal offset
hexdump -d file.txt
# -d = decimal (offset in decimal)Single bytes:
# One-byte format
hexdump -b file.txt
# -b = bytes (one-byte octal)ASCII representation:
# ASCII view
hexdump -C file.txt
# -C shows ASCII on right sideLimit output:
# Limit length
hexdump -C -n 100 file.txt
# -n = length (first 100 bytes)Check installation:
# hexdump is part of util-linux
# Usually pre-installed
# Check hexdump
which hexdumpThis guide covered hexdump usage, hexadecimal dump, and binary data analysis for Arch Linux, CachyOS, and other distributions.
- od Guide - Octal dump
- file Guide - File type detection
- stat Guide - File statistics
-
hexdump Documentation:
man hexdump
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.