How do I compare two binary files on Linux?

The easiest way I found is dumping the binaries into text files using hexdump and then comparing them with your favourite program (diff, Meld, etc.). E.g.:
hexdump -C a.bin >a.txt
hexdump -C b.bin >b.txt
diff a.txt b.txt
Comments