Home » Uncategorized » How to use hexedit to View and Edit Binary Files in Hexadecimal ?

How to use hexedit to View and Edit Binary Files in Hexadecimal ?

If we have a binary file and we need to edit some of the text from this binary files, “hexedit” command in Ubuntu comes to help us to achieve the same.

How to Install “hexedit” on Ubuntu ?

$ apt install hexedit

Once we installed hexedit command on Ubuntu, we can use the “hexedit” command to open and view the binary file in hexadecimal and also in ASCII of the same hex in right side window.

Then once we open the binary file, we can change the respective hex values as per our requirement and save the file using F2.

Demo of using hexedit

Lets create 1 MB binary file using DD command as,

$ dd if=/dev/zero of=hello.bin bs=1M count=1

1+0 records in
1+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.00113456 s, 924 MB/s

Leave a Comment