What is a good HEX editor on Linux

A hex editor is different from a regular text editor in that the former displays the raw binary content of a given file, without applying any text encoding or typesetting. A hex editor can be useful in various cases, e.g., repairing disk image and partition, reverse-engineering binary code, patching emulator ROM files, analyzing malware, etc.

In this tutorial, I introduce a HEX editor called wxHexEditor which is available for Linux, Windows and MacOS X.

wxHexEditor Features

wxHexEditor offers a number of powerful features.

  • 64-bit file descriptors supporting files or devices of up to 2^64 bytes.
  • Extremely fast with handling large files by not copying the whole files to RAM.
  • Can handle multiple byte insertions or deletions without creating a temp file.
  • Low memory footprint (e.g., 25 MB memory for opening multi GB files).
  • Disassembly support for x86, x86-64, MMX, SSE, SSE2, SSE3, AMD-V, Intel VT-x.
  • Support for process memory editing.
  • Can handle XOR-based obfuscation.
  • Multiple views to show multiple files.
  • Support for multiple encodings (e.g., UTF8/16/32, Shift JIS, GBK, EUC, etc).

Install wxHexEditor on Linux

To install wxHexEditor on Debian, you can build wxHexEditor from its source as follows.

$ sudo apt-get install debhelper libdisasm-dev libmhash-dev libwxbase2.8-dev libwxgtk2.8-dev wx-common wx2.8-headers
$ svn checkout svn://svn.code.sf.net/p/wxhexeditor/code/trunk wxHexEditor
$ cd wxHexEditor
$ make OPTFLAGS="-fopenmp"

On Ubuntu, wxHexEditor is available via GetDeb Apps repositories. To install wxHexEditor on Ubuntu:

$ wget -q -O - http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -
$ sudo sh -c 'echo "deb http://archive.getdeb.net/ubuntu $(lsb_release -cs)-getdeb apps" >> /etc/apt/sources.list.d/getdeb.list'
$ sudo apt-get update
$ sudo apt-get install wxhexeditor

To install wxHexEditor on Fedora, build it from its source as follows.

$ sudo yum install libtool gcc-c++ wxGTK-devel
$ svn checkout svn://svn.code.sf.net/p/wxhexeditor/code/trunk wxHexEditor
$ cd wxHexEditor
$ make OPTFLAGS="-fopenmp"

To install wxHexEditor on CentOS or RHEL, first enable Repoforge repository, and then follow the same procedure as in Fedora.

/lib/libgbm.so.1: undefined reference to `wayland_buffer_is_drm'

If you encounter the above build error on Fedora, updating mesa-libgbm package solves the problem.

$ sudo yum install mesa-libgbm

Subscribe to Xmodulo

Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.

Support Xmodulo

Did you find this tutorial helpful? Then please be generous and support Xmodulo!

The following two tabs change content below.
Dan Nanni is the founder and also a regular contributor of Xmodulo.com. He is a Linux/FOSS enthusiast who loves to get his hands dirty with his Linux box. He likes to procrastinate when he is supposed to be busy and productive. When he is otherwise free, he likes to watch movies and shop for the coolest gadgets.

8 thoughts on “What is a good HEX editor on Linux

  1. I use GHex. They all work pretty much the same. I wonder if there is a vim like terminal based hex editor?

  2. My experiece of needing a hex character file replacement in Debian Sid; As of now, both Bless and WxHexeditor have problems, ghex is good.

Leave a comment

Your email address will not be published. Required fields are marked *