notes-computer-programming-hexEditor

my hex editor recommendation for GNU/Linux: okteta.

Review of hex editors for GNU/Linux

i was looking for a hex editor today. I'm shocked that i haven't had need for a hex editor for so long (since i was on the Apple c, i guess)!

the current contenders appear to be:

Emacs (text editor), vim (text editor), and mc (text-mode file browser) also have built-in text editors. Emacs's is called 'hexl-mode', and i found it insufficient (too hard to figure out how to insert hex into an empty file in my 'EVIL'-mode emacs setup). Vim's just uses xxd, which converts a binary file to textual hex and back again.

As of this writing, okteta and ht and ghex and wxhexeditor (wxHexEditor) and wxMEdit seem to be at least somewhat actively maintained (but http://alternativeto.net/software/wxhexeditor/?license=opensource&platform=windows lists wxhexeditor as 'discontinued'). okteta, ht, wxhexeditor, and wxMEdit are apparently cross-platform across all of GNU/Linux, Windows, and MacOS?; but okteta doesn't seem to have a homepage with a separate executable download for Windows, instead it seems that you have to install something called 'KDEWin'. Except for WxMEdit?, all of these are in Ubuntu repos (WxMEdit? has an Ubuntu .deb that you can download from its website, though).

I tried them out.

hte is text-mode. In Help (F1), in Key Bindings, some bindings are listed with Alt-, which didn't work for me, but ESC- works instead. ESC- also gets to the menu (eg ESC-f for the File menu). It has a disassembler and a powerful script-like tool called 'block operations', and various commands for assembly to follow addresses, make labels, assemble, etc. The user interface was a little hard to use but i think you would get used to it quickly; likewise the Help seems to have most of what you need but without much of an overview. I think it would be a great choice if you were in an environment that was limited to console input, especially if you were working with assembly, but i found the lack of mouse input too crippling for an editor.

wxHexEditor has a relatively simple UI, but it is a little clunky and took me a minute to figure out. It appears to be undocumented except on its wiki. It appears to have all the basics (eg two-panel display, modifying either the hex or the text, selection of regions and insertion or deletion of them, goto offset, what-is-the-value-starting-at-the-current-location-using-various-encodings, find-and-replace in hex or text, undo) as well as some other features, such as disassembly, multilevel undo/redo, TAGs (highlighting various regions of the file in custom color and naming them), goto offset relative to current position or from end-of-file, checksum, and some comparison features.

ghex is very simple and easy to use (but not very featureful). It has all the basics but not too many advanced features, except that you can bring up multiple 'views' on the same file, and its what-is-the-value-starting-at-the-current-location-using-various-encodings is fairly good. It is documented but you won't need the documentation because it's so easy.

okteta is easy to use and also featureful. It has all the basics and many advanced features, including checksum (on any selected region), goto offset relative to cursor or file, forwards or backwards, charset choice, offset coding in hex or decimal, hex or binary, column or row-based view, splits/multiple views, find in hex/ascii, select range by offset, set read-only permission, bookmarks, string browser, character frequency count statistics, custom strutures.

wxMEdit is actually an ordinary text editor with a hex mode. It doesn't appear to have any documentation. The Hex mode doesn't appear to be two-column; perhaps there is an option for this but if so i can't find it.

So out of these, okteta is the obvious choice (unless you must work on the console/without a mouse, in which case hte; or unless you need an integrated disassembler, in which case hte or wxHexEditor). Okteta is easy to use and featureful.