Need a good hex editor for Linux [closed]
Asked Answered
S

4

388

I need a good hex editor for Linux, and by good I mean:

  • Fast
  • Has search/replace features
  • Can display data not only in hex, but also binary, octal, etc.
  • Can work with huge (> 1 GB) files without becoming slow and unresponsive (this requirement is important)
  • Optionally, has some compare/diff features

What can you suggest?

Slapup answered 31/3, 2011 at 10:11 Comment(13)
For Ubuntu: jeex (GTK), okteta (KDE). okteta is much better.Mufinella
I'm glad that when such questions get closed, they don't get deleted and can be voted on. That way, I can see the Q&A format I want, rather than reading a bunch of useless forums elsewhere on the net.Sinless
I use sweetscape.com/010editor on Linux. Not free but worth the money ( no affiliation )Leman
@Masi He was asking for an editor, not a viewer.Handclap
wtf on closing this. "software tools commonly used by programmers" would make this on topic (and "unique to software development" is just a stupid requirement ... nothing is unique to software development. eg. I could use a C compiler for hardware benchmarking). hex editors are useful for programming, eg. binary protocols and file formats;, and making disk utilitites, especially for data recovery. In my case I was about to write a python program to find a missing NTFS partition (testdisk failed since it uses CHS ... wtf), and wanted to see the "magic" of a good partition in a hex editor first.Procarp
radare2 - is a framework for reverse engineering, also may work as hex editor: radare.gitbooks.io/radare2book/content/visual_mode/intro.htmlTwitter
@Procarp According to the Help Center, "Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic"Saurel
You could use Emacs for HEX editing. It's fast and can work really well with big files. Just type M-x hexl-modeVostok
See: slant.co/improve/topics/7433/~hex-editors-for-linux (web site for this purpose)Comstock
The rule used to close this is stupid. Recommendations for open source tools to help with our work is anything BUT off-topic.Isola
It may be "on-topic" but answers would be opinion-based (and subject to becoming out-dated quickly). That's what is trying to be avoided. But I'm here for the opinions anyway. ;-)Jabon
Agreed, opinion based. Would need to see a feature comparison. Hex editors are programming tools, by extension the question is a programming question. Especially if the hex editor calculated hashes or at least CRC. Programming does not just mean code review and homework.Bewhiskered
Try to have a look at Fhex a new hex editor written in C++11/Qt5Cornwallis
C
298

Bless is a high quality, full featured hex editor.

It is written in mono/Gtk# and its primary platform is GNU/Linux. However it should be able to run without problems on every platform that mono and Gtk# run.

Bless currently provides the following features:

  • Efficient editing of large data files and block devices.
  • Multilevel undo - redo operations.
  • Customizable data views.
  • Fast data rendering on screen.
  • Multiple tabs.
  • Fast find and replace operations.
  • A data conversion table.
  • Advanced copy/paste capabilities.
  • Highlighting of selection pattern matches in the file.
  • Plugin based architecture.
  • Export of data to text and html (others with plugins).
  • Bitwise operations on data.
  • A comprehensive user manual.

wxHexEditor is another Free Hex Editor, built because there is no good hex editor for Linux system, specially for big files.

  • It uses 64 bit file descriptors (supports files or devices up to 2^64 bytes , means some exabytes but tested only 1 PetaByte file (yet). ).
  • It does NOT copy whole file to your RAM. That make it FAST and can open files (which sizes are Multi Giga < Tera < Peta < Exabytes)
  • Could open your devices on Linux, Windows or MacOSX.
  • Memory Usage : Currently ~10 MegaBytes while opened multiple > ~8GB files.
  • Could operate thru XOR encryption.
  • Written with C++/wxWidgets GUI libs and can be used with other OSes such as Mac OS, Windows as native application.
  • You can copy/edit your Disks, HDD Sectors with it.( Usefull for rescue files/partitions by hand. )
  • You can delete/insert bytes to file, more than once, without creating temp file.

DHEX is a more than just another hex editor: It includes a diff mode, which can be used to easily and conveniently compare two binary files. Since it is based on ncurses and is themeable, it can run on any number of systems and scenarios. With its utilization of search logs, it is possible to track changes in different iterations of files easily. Wikipedia article

You can sort on Linux to find some more here: http://en.wikipedia.org/wiki/Comparison_of_hex_editors

Cheerleader answered 1/4, 2011 at 11:13 Comment(14)
How to delete or add bytes with DHEX?Endogen
I have, for small binary file editing, resorted to using xxd -r. If you are on OS X, HexFiend is fantastic. (I was editing a file containing a password so I didn't want to copy it over a network)Endogen
@StevenLu is right. I wish there was something that lightweight for the linux environment.Elysium
the wiki comparison tables are so messy.. but we can easy it by using something like chromium "inspect element" and delete all table rows (tr) that does not interest! we can even click on sort columns after removing rows!! :DMurat
wxHexEditor at 0.22 still has serious usability problems/limitations, but seems still the best one.Murat
Be careful if you decide to use wxHexEditor. The file hex diff tool isn't working properly (skips some differences). I lost quite some time because of this.Arette
Is bless still maintained? It's quite nice, but has some easy bugs that haven't been fixed for ages (e.g. status line). And Ubuntu's packaging or something installs it without a configured tmp directory, so it can only save if it's overwriting in place (file length hasn't changed)Megawatt
@StevenLu I looked at dhex source code, it seems that it's not possible to delete/add bytes (at least in current version 0.68)Enteron
Bless says it can open block devices but it no way I'm seeing it reading sectors from /dev/sdc. How am I supposed to see a disk's sectors with this "blessed" piece of software?Pyrenees
Bless requires you install ton of dependent packages of mono. Avoid itOmarr
bless is now unusable for me. There is a crippling bug that doesn't allow files to be overwritten within the application. Look elsewhere.Nickolenicks
wxHexEditor seems to be the best one out there for the time being [2018-04-16]. Color tags are a killer feature indeed.Mohock
Another -1 for bless; on Ubuntu 16.04 there are numerous issues with the configuration files, and a "sharing violation" on the preferences file. I would not recommend it.Sirajuddaula
wxHexEditor, even at v 0.32, is buggy and unintuitive. Find and replace is pretty poor, and being unable to save to files it's made bigger isn't great.Sirajuddaula
F
153

I am a VIMer. I can do some rare Hex edits with:

  • :%!xxd to switch into hex mode

  • :%!xxd -r to exit from hex mode

But I strongly recommend ht

apt-cache show ht

Package: ht
Version: 2.0.18-1
Installed-Size: 1780
Maintainer: Alexander Reichle-Schmehl <[email protected]>

Homepage: http://hte.sourceforge.net/

Note: The package is called ht, whereas the executable is named hte after the package was installed.

  1. Supported file formats
    • common object file format (COFF/XCOFF32)
    • executable and linkable format (ELF)
    • linear executables (LE)
    • standard DO$ executables (MZ)
    • new executables (NE)
    • portable executables (PE32/PE64)
    • java class files (CLASS)
    • Mach exe/link format (MachO)
    • X-Box executable (XBE)
    • Flat (FLT)
    • PowerPC executable format (PEF)
  2. Code & Data Analyser
    • finds branch sources and destinations recursively
    • finds procedure entries
    • creates labels based on this information
    • creates xref information
    • allows to interactively analyse unexplored code
    • allows to create/rename/delete labels
    • allows to create/edit comments
    • supports x86, ia64, alpha, ppc and java code
  3. Target systems
    • DJGPP
    • GNU/Linux
    • FreeBSD
    • OpenBSD
    • Win32
Fussy answered 25/2, 2012 at 5:0 Comment(5)
I love the vi command! I tried installing ht and got mired in a bunch of TeX broken dependencies. Ended up using shedSapper
To install ht: sudo apt-get install ht. To run: hte <file> note the trailing e! hte, not ht. I have no clue why the package couldn't also be called hte.Checkrein
@Checkrein maybe because of ht of package tex4htAnnikaanniken
Don't forget to :set binary when using vim + xxd! Otherwise, vim will add a line terminator to the end of the file, which has a very high chance of corrupting said file (and it does. A lot). Binary mode ensures that vim leaves that out. On a somewhat-related note, you can change the file format between unix/max/windows by using :set ff=[unix/mac/dos], to ensure vim uses the correct line endings for the target system.Brok
If you plan on adding/removing bytes, consider using xxd -p and xxd -r -p. The -p option disables the address prefix and the ASCII preview, leaving only the raw hexadecimal bytes.Dashpot
A
16

Personally, I use Emacs with hexl-mod.

Emacs is able to work with really huge files. You can use search/replace value easily. Finally, you can use 'ediff' to do some diffs.

Anzus answered 31/3, 2011 at 10:15 Comment(1)
is there a non-emacs one? I know how to do xxd/vim combos, but that can be annoying sometimes.Homeopathy
A
10

wxHexEditor is the only GUI disk editor for linux. to google "wxhexeditor site:archive.getdeb.net" and download the .deb file to install

Aeromancy answered 27/2, 2013 at 7:40 Comment(5)
I tried installing on Ubuntu 14 and it's really hard and it still fails.Chaplain
@Yan King Yin, give a try to Bless Hex Editor, it's good for editing binary fileAeromancy
Thanks, but I'm using Okteta now, it satisfied my needs for now...Chaplain
To install in Ubuntu, google for wxhexeditor ppa which should give you launchpad.net/ubuntu/+source/wxhexeditorAntinomian
To install to ubuntu try sudo apt-get install wxhexeditorLisabethlisan

© 2022 - 2024 — McMap. All rights reserved.