Od Installation On A Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS

Od Installation On A Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS

od

Display file contents in octal, decimal or hexadecimal format.
Optionally display the byte offsets and/or printable representation for each line.

Maintainer: Michael Stone



Section: utils

Install od

  • Debian apt-get install coreutils Click to copy
  • Ubuntu apt-get install coreutils Click to copy
  • Alpine OS apk add coreutils Click to copy
  • Arch Linux pacman -S coreutils Click to copy
  • Kali Linux apt-get install coreutils Click to copy
  • CentOS yum install coreutils Click to copy
  • Fedora dnf install coreutils Click to copy
  • Raspbian apt-get install coreutils Click to copy
  • macOS brew install coreutils Click to copy

Display file contents in octal, decimal or hexadecimal format. Optionally display the byte offsets and/or printable representation for each line.

How to use od?

Below are few example commands for od that you can use in the terminal.

Display file using default settings: octal format, 8 bytes per line, byte offsets in octal, and duplicate lines replaced with `*`:
od path/to/fileClick to copy
Display file in verbose mode, i.e. without replacing duplicate lines with `*`:
od -v path/to/fileClick to copy
Display file in hexadecimal format (2-byte units), with byte offsets in decimal format:
od --format=x --address-radix=d -v path/to/fileClick to copy
Display file in hexadecimal format (1-byte units), and 4 bytes per line:
od --format=x1 --width=4 -v path/to/fileClick to copy
Display file in hexadecimal format along with its character representation, and do not print byte offsets:
od --format=xz --address-radix=n -v path/to/fileClick to copy
Read only 100 bytes of a file starting from the 500th byte:
od --read-bytes 100 --skip-bytes=500 -v path/to/fileClick to copy
To install the latest version of od in your favorite operating system just copy the od installation command from above and paste it into terminal. It will download and install the latest version of od 2026 package in your OS.