Binary Type Matters

30 Jun 2013

A 32-bit machine CANNOT execute a 64-bit binary and this statements also holds the other way around.

But what would happen if you try that? If you are working on a ubuntu system, mostly likely a message will spit out:

No such file or directory

What you can do is to use file command to figure out the binary type:

$ file a.out
a.out: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV)

a.out: ELF 32-bit LSB executable tells you that this is a 32-bit executable. Perhaps you want to read more about ELF format.