File types / Programs & scripts

.elf file

Linux executable (ELF)

Extensions
.elf, .so
MIME type
application/x-executable
Signature
7F 45 4C 46  (.ELF)at byte offset 0
Safety
Can run code

What is a .elf file?

ELF is the standard executable and shared-library format on Linux and many other Unix-like systems.

Every ELF file starts with 7F followed by the letters ELF. The next bytes say whether it is 32-bit or 64-bit and which byte order it uses.

Used for: Programs, libraries and compiled code on Linux.

How can I tell if a file is really a ELF?

Read its first bytes rather than trusting the name. A genuine ELF file has the signature 7F 45 4C 46 (.ELF) at byte offset 0. The File Identity tool reads these bytes in your browser, so the file is never uploaded.

To compare the name against the content, use Validate Extension. To see the raw bytes, use Safe File Preview.

Is a .elf file safe to open?

ELF files are programs. Do not run one you cannot explain.

Easy to confuse

Executable scripts begin with #! instead and are text, not ELF.