Session and utilities

The xxd command

Shows a file in hexadecimal and its text equivalent, byte by byte. Essential to inspect binary data.

Syntax

xxd [archivo]

Most useful options

-rReverts: from hexadecimal to binary
-g NGroups bytes N by N

Copy-ready examples

$ echo hola | xxdHexadecimal dump

You can try them in the browser terminal: it does not touch your computer.

Typical mistakes

  • Non-printable bytes appear as a dot in the text column.

Related commands

FAQ

What is looking at bytes for?

To debug formats, check file headers or understand encodings.

Learn to actually use it

The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.

Start the free course