Inspect, format and analyze binary files directly from the shell. 21.03.2026 | reading time: 2 min Peek under the bytes with hexdump and make sense of binary files at the command line. The utility converts raw file data into readable hex and ASCII layouts so the administrator can inspect headers, spot corruption, or craft small patches. Quick demo Create a short file and view it in canonical hexdump format with the commands shown below. ```bash echo -n "Hello" > example.bin hexdump -C example.bin ``` The output will look like: ``` 00000000 48 65 6c 6c 6f |Hello| 00000005 ``` Power flags Several switches shape the output: use `-C` for canonical hex+ASCII, `-v` to avoid collapsing identical lines, `-s` to skip bytes and `-n` to limit the number of bytes shown. For custom layouts the `-e` format string lets the administrator print arbitrary combinations of integers, bytes and characters to match parsing needs. Practical workflows Call hexdump from pipes or scripts to inspect fragments quickly, for example `dd if=image.img bs=512 count=1 | hexdump -C` to view the first sector, or `hexdump -C -s 128 -n 64 file.bin` to examine a specific range; combine with `less` for paging. Use hexdump to verify magic numbers, check endianness or confirm that a patch produced the expected byte changes. Related utilities Hexdump is one tool among many for binary inspection: `xxd` offers easy reverse conversion to recreate binaries, `od` provides traditional octal and numeric dumps, and `strings` extracts printable sequences for quick reconnaissance. Choose the tool that matches the task: visualization, conversion or text extraction. Next steps Start practicing by inspecting different file types and writing small `hexdump`-based scripts to automate checks; the skills pay off in debugging and security reviews. If you want structured learning and exam preparation, consider deepening Linux knowledge and pursuing certifications like CompTIA Linux+ or LPIC-1 with intensive courses at bitsandbytes.academy. Join Bits & Bytes Academy First class LINUX exam preparation. utilities troubleshooting scripting