- Top Hex Editors for Linux
- What is Hex editor
- Who use Hex editor
- 1. Xxd Hex Editor
- 2. Hexedit Hex Editor
- 3. Hexyl Hex Editor
- 4. Ghex – GNOME Hex Editor
- 5. Bless Hex Editor
- 6. Okteta Editor
- 7. wxHexEditor
- 8. Hexcurse – Console Hex Editor
- 9. Hexer Binary Editor
- Best Hex Editors for Linux
- Xxd
- Jeex
- GHex
- wxHexEditor
- Okteta
- Hexedit
- Hexer
- Conclusion
- About the author
- Nitesh Kumar
Top Hex Editors for Linux
In this article, we are going to review some of the best hex editors for Linux. But before we start, let’s look at what a hex editor really is.
What is Hex editor
In simple words, a hex editor allows you to examine and edit binary files. The difference between a regular text editor and the hex editor is that the regular editor represents the logical content of the file, while a hex editor represents the physical contents of the file.
Who use Hex editor
Hex editors are used for editing individual bytes of data and are mostly used by programmers or system administrators. Some of the most commonly used cases are debugging or reverse engineering binary communication protocols. Of course, there are many other things you can use hex editors – for example reviewing files with the unknown file format, performs hex comparison, reviewing program memory dump, and others.
Most of these mentioned hex editors are available to install from the default repository using your distribution’s package manager, like so:
# yum install package [On CentOS] # dnf install package [On Fedora] # apt install package [On Debian/Ubuntu] # zypper install package [On OpenSuse] # pacman -Ss package [on Arch Linux]
If no package available, head over to the website of each tool where you will get the standalone package for download and installation procedures, along with details on dependencies.
1. Xxd Hex Editor
Most (if not every) Linux distributions come with an editor that allows you to perform hexadecimal and binary manipulation. One of those tools is the command-line tool – xxd, which is most commonly used to make a hex dump of a given file or standard input. It can also convert a hex dump back to its original binary form.
2. Hexedit Hex Editor
Hexedit is another hexadecimal command-line editor that might already be preinstalled on your OS. Hexedit shows both the hexadecimal and ASCII view of the file at the same time.
3. Hexyl Hex Editor
Another useful tool for examining binary file is hexyl, is a simple hex viewer for Linux terminal that uses a colored output to determine different categories of bytes.
The view of hexyl is split into three columns:
- Offset column to tell you how many bytes into the file you are.
- Hex column, which contains the hexadecimal view of the file. (Note that there is a splitting line in between)
- Textual representation of a file.
The installation of this hex viewer is different for different operating systems, so it is recommended to check the readme file in the project to see the exact installation instructions for your OS.
4. Ghex – GNOME Hex Editor
Ghex is a graphical hex editor that lets users edit a binary file in both hex and ASCII format. It has a multilevel undo and redo mechanism that some may find useful. Another useful feature is finding and replacing functions and converting between binary, octal, decimal, and hexadecimal values.
5. Bless Hex Editor
One of the more advanced hex editors in this article is Bless, which is similar to Ghex, it has a graphical interface that allows you to edit large data files with a multilevel undo/redo mechanism. It also has customizable data views, a find-replace feature, and multi-threaded search and saves operations. Multiple files can be opened at once using tabs. Functionality can also be extended through plugins.
6. Okteta Editor
Okteta is another simple editor for reviewing raw data files. Some of the main features of okteta include:
- Different views of characters – traditional in columns or in rows with a value of the top of the character.
- Editing similar to a text editor.
- Different profiles for data views.
- Multiple open files.
- Remote files by FTP or HTTP.
7. wxHexEditor
wxHexEditor is another one of the Linux hex editors that have some advanced features and while there is no official documentation for the editor, there is a well-written wiki page that provides an explanation as to how to use them too.
whHexEditor is aimed mainly at large files. It works faster with larger files because it does not attempt to copy the entire file into your RAM. It has low memory consumption and can view multiple files at once. Since it has so many features and benefits, you may want to review them all on the wiki page or the official wxHexEditor website.
8. Hexcurse – Console Hex Editor
Hexcurse is a Ncurses-based hex editor. It can open, edit, and save files within a friendly terminal interface that allows you to go to a specific line or perform a search. You can easily toggle between hex/decimal addresses or switch between hex and ASCI windows.
9. Hexer Binary Editor
Hexer is another command-line binary editor. The difference in this one is that it is a Vi-like style editor for binary files. Some of the most notable features are – multi buffers, multilevel undo, command-line editing with completion, and binary regular expression.
Conclusion
That was a quick review of some of the most commonly used hex editors in Linux. Let us hear your opinion. What hex editors do you use and why do you prefer that editor in particular? What makes it better over the others?
Best Hex Editors for Linux
This article will list useful hex editor applications available for Linux. Hex editors allow you to modify pre-compiled binary files whose source code is typically not available to change. They work by browsing binary data present in a file and then presenting the data in hexadecimal notation to users. Hex editors can also show partial or full ASCII data depending on the contents of the file.
These hex editors allow you to change hexadecimal values, thereby allowing users to modify file behavior even if they don’t have access to source code. However, the data represented by a hex editor is not exactly human readable. Reading and interpreting hexadecimal values to infer program logic and behavior is not an easy task by any means and it takes considerable efforts to find values and make even the smallest of change. A hex editor is one of the first tools used while reverse engineering a file.
Xxd
Xxd command allows you to dump hexadecimal data from a binary file. It can also reverse dump the hexadecimal data into a binary file, thus making it a useful command line hex editor. It is available in repositories of almost all major Linux distributions, usually as a part of the Vim text editor package.
To dump hex data from a file, run a command in the following format:
To convert a hexdump to binary, use “r” switch:
You can explore all of its options by running the two commands mentioned below:
Jeex
Jeex is an open source hex editor that can view and edit binary files. It can present data in binary, ASCII, hexadecimal and octal formats. It can be used to find and replace values in a variety of formats, explore data types and parse strings. It can also be used to view differences between two binary files.
You can install Jeex in Ubuntu by using the command mentioned below:
Jeex is available in repositories of all major Linux distributions, so you can install Jeex from the package manager. You can also compile a build from source code available here.
GHex
GHex or “GNOME Hex Editor” is part of the GNOME3 application stack and is available in default repositories of most Linux distributions. It can present data in both hex and ASCII formats and you can edit and save your changes to the original binary file. You can also use it to show a table of values converted into different notations.
You can install GHex in Ubuntu by using the command mentioned below:
GHex is available in repositories of all major Linux distributions, so you can install GHex from the package manager. You can also download it from the Flathub store.
wxHexEditor
wxHexEditor is a hex editor that is specially designed to handle large binary files whose size can run in GBs. Its other features are on par with GHex and Jeex as it can both modify contents of a binary file and save them into the original file.
You can install wxHexEditor in Ubuntu by using the command mentioned below:
wxHexEditor is available in repositories of all major Linux distributions, so you can install wxHexEditor from the package manager. You can also compile its executable binary file from source code.
Okteta
Okteta is a hex editor written in C++ and Qt libraries. It is part of the KDE application suite and it features a multi-pane layout for better visibility and readability of binary data. Okteta’s main features include multiple data views, dockable panes, numerical and character encodings, tabbed views and so on.
You can install Okteta in Ubuntu by using the command mentioned below:
Okteta is available in repositories of all major Linux distributions, so you can install Okteta from the package manager. You can also download it from the Flathub store.
Hexedit
Hexedit is an open source command line tool that can view and edit binary files by presenting data in hexadecimal and ASCII formats. It supports searching data by values and can show scrollable output. It also accepts numerous keyboard shortcuts to navigate through the hex data. Hexedit also features useful editing shortcuts for copying, pasting and selecting the data.
You can install Hexedit in Ubuntu by using the command mentioned below:
Hexedit is available in repositories of all major Linux distributions, so you can install Hexedit from the package manager. You can also compile its executable binary file from source code.
To open a binary file in Hexedit, use a command in the following format:
To learn more about its usage, run the following two commands:
Hexer
Hexer is a command line hex editor that supports vi-like interface and keybindings. It can show multiple buffers and supports auto-completion. It can also use RegEx expressions to search data and allows users to undo their changes.
You can install Hexer in Ubuntu by using the command mentioned below:
Hexer is available in repositories of all major Linux distributions, so you can install Hexer from the package manager. You can also compile its executable binary file from source code.
To open a binary file in Hexer, use a command in the following format:
To learn more about its usage, run the following two commands:
Conclusion
Hex editors are really useful to view binary data of pre-compiled files whose source code is typically not available. However, viewing hex data, finding right values, understanding patterns and editing data can be an extremely difficult task as often human readable data is not available. In Spite of these challenges, developers often use hex editors to reverse engineer binary data.
About the author
Nitesh Kumar
I am a freelancer software developer and content writer who loves Linux, open source software and the free software community.