The answer to the question in the title is right there at the beginning of the output:
ELF 64-bit LSB executable, x86-64
ELF is the Executable and Linkable Format, the binary executable file format most commonly used by Linux.
x86-64 is the architecture of the binary, the 64-bit version of the x86 instruction set originally introduced by AMD. For reasons that are beyond me, Microsoft refers to it as "x64", but that's the same thing.
If you need to know the architecture of the kernel itself, you can use uname -mpi
. For example, on my system, that prints:
x86_64 unknown unknown
which means that I am running an x86-64 kernel.
If you're interested in the CPU itself, look at /proc/cpuinfo
for details about the CPU(s) detected by the Linux kernel.
A 32-bit 80x86 executable is identified by file
as, for example:
ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, stripped
which tells us that it's a 32-bit executable using the Intel 80386 instruction set (possibly with extensions).
Note that it isn't quite as simple as 32-bit versus 64-bit architectures. For example, the Linux kernel supports 32-bit architectures like Intel 80386, AVR32, S/390 and Unicore32. On the 64-bit side of things, Linux is usable on PA-RISC, x86-64, Itanium and Alpha, among others. Not all distributions provide binaries for all architectures, however (and I doubt there are any distributions that target all supported CPU architectures equally). So if you want to know whether a given binary will be executable on a given system, you need to consider the architecture, rather than the CPU's native word size.