LinuxCommandLibrary

imhex

Analyze and edit binary files

TLDR

Open a file in ImHex

$ imhex [path/to/file]
copy

Create a new empty file
$ imhex --new
copy

Open a file in the currently running ImHex instance and select a range of bytes (offsets in hexadecimal)
$ imhex --open [path/to/file] --select [0xstart_offset] [0xend_offset]
copy

Display information about a file
$ imhex --file-info [path/to/file]
copy

Calculate the hash of a file using a specific algorithm (md5, sha1, sha224, sha256, sha384, sha512)
$ imhex --hash [algorithm] [path/to/file]
copy

Generate a hex dump of a file
$ imhex --hexdump [path/to/file]
copy

Display version
$ imhex --version
copy

SYNOPSIS

imhex [OPTION]... [FILE]...

PARAMETERS

-h, --help
    Show help information and exit

-v, --version
    Print version information and exit

--patterns <DIR>
    Override directory for pattern files

--constants <DIR>
    Override directory for constant files

--plugins <DIR>
    Override directory for plugins

--fonts <DIR|FONT>
    Override directory for fonts or use specific font file

--no-plugins
    Disable automatic loading of plugins

--no-updates
    Disable automatic update checks

--no-fuzzy-i18n
    Disable loading fuzzy translation files
(for developers)

--crash-report <FILE>
    Save crash report to FILE

DESCRIPTION

ImHex is a powerful, open-source hexadecimal editor designed for reverse engineers, programmers, and security researchers. It provides a user-friendly graphical interface for viewing, editing, and analyzing binary data with features like pattern highlighting, data visualization graphs, advanced search, and scripting support via Lua. Unlike traditional hex editors, ImHex supports ImHex Pattern Language (IPL) for defining custom data structures, making it ideal for parsing complex file formats. It handles large files efficiently with a virtual file system backend and offers disassembly views for various architectures. On Linux, ImHex is typically installed via Flatpak, AppImage, or from source, launching a GUI window upon invocation. It excels in tasks such as firmware analysis, malware dissection, and file format reverse engineering, combining ease of use with professional-grade tools.

CAVEATS

ImHex is primarily a GUI tool; command-line editing is limited. Requires GTK3 and OpenGL. Large files may consume significant RAM. Plugins and patterns need separate installation.

INSTALLATION

On Linux: flatpak install flathub org.imhex.ImHex or build from GitHub source.

KEY FEATURES

Pattern language (IPL), hex/ASCII views, entropy graphs, bookmarks, Lua scripting, and architecture-specific disassemblers.

HISTORY

Developed by WerWolv starting in 2021 as a modern alternative to legacy hex editors. Gained popularity through GitHub (over 10k stars), with regular releases adding IPL, visualizations, and multi-platform support. Actively maintained with community contributions.

SEE ALSO

hexedit(1), xxd(1), bless(1), radare2(1)

Copied to clipboard