.EXEC

EXEC File

Unix Executable File
Ask a question
QUICK ANSWER

A .exec file is a Unix/Linux/macOS executable - a program or script meant to be run, not viewed. On Linux or macOS open a terminal, run "chmod +x file.exec" then "./file.exec". Never run a .exec from an untrusted source; it executes with your full user privileges.

Developer: N/A (generic Unix/Linux/macOS convention) Category: Executable Files MIME: application/x-executable
OPENS ON Windows macOS Linux
Related: .APK · .EXE · .VBS · .JAR

On this page

19k+ extensions indexed
Last reviewed Aug 13, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the EXEC file format?

Executable files for Unix and Unix-like systems can be saved with the .exec extension. A .exec file can hold virtually any program executable on a given operating system - either a compiled binary (such as an ELF binary on Linux/Unix) or a plain-text interpreter script. .exec has its counterpart in the form of .exe files on Windows systems.

As a rule on Unix systems, executable files are saved without any extension - the .exec suffix is used to mark executable files in file managers and IDEs on macOS, Linux, or FreeBSD, distinguishing the runnable output from source files.

The ability to execute a .exec file is determined by the file's permission bits and its internal header, not the extension. The kernel checks magic bytes at offset 0: ELF binaries begin with \x7FELF, macOS Mach-O binaries with FEEDFACE, and scripts with #! followed by an interpreter path (e.g., #!/bin/bash for a .sh script).

.exec files can be run from the command line (shell). On macOS, the executable bit (the x permission attribute) is what matters - a file runs correctly with or without the .exec extension. Before running an unfamiliar .exec file, use the file command to confirm its actual type.

Security & safety

RISK: HIGH

An executable is the highest-risk file type to run from an untrusted source: a .exec runs with your user privileges and can read, modify, encrypt or delete your files and download more code. Before running one you didn't build: run 'file file.exec' to see what it is, and if it's a text script, read it first. On macOS, Gatekeeper will block unsigned/unnotarized binaries by default - that warning is there for your protection. Never blindly 'chmod +x' and run a file from a forum, email or random download. The extension '.exec' confers no safety; trust the source, not the suffix.

Format details

in a nutshell
FULL NAMEUnix Executable Fileaka Unix executable, executable script
DEVELOPERN/A (generic Unix/Linux/macOS convention)since N/A (extension-less executables predate the .exec label; concept from early Unix)
MIME TYPEapplication/x-executable
TYPEExecutable program or script (ELF/Mach-O binary, or text shell script)
This extension is also used by…
  • Application/IDE export marker - Some build tools and apps name their produced runnable artifact *.exec purely as a label; the real type underneath is still ELF/Mach-O/script.
MAGIC BYTES · FILE SIGNATURE
OFFSET
00010203
HEX
7F454C46
ASCII
·ELF
A .exec has no signature of its own - it depends on what kind of executable it is. A compiled Linux/Unix binary is ELF: 7F 45 4C 46 ("\x7FELF") at offset 0. A shebang script starts with "#!" (23 21) followed by an interpreter path. A compiled macOS binary is Mach-O: magic FE ED FA CE (32-bit) / FE ED FA CF (64-bit), or the CA FE BA BE universal/"fat" header. On Unix, executability is set by the file's permission bits, not the extension.

Programs that open EXEC files

Windows2 apps
WSL (Windows Subsystem for Linux) Built-in Run a Linux ELF .exec inside WSL: 'chmod +x file.exec && ./file.exec'. A Linux binary will not run in native Windows.
7-Zip (inspect only) Open-source 7-Zip can list sections of an ELF/Mach-O to inspect a binary without executing it; it cannot run it.
macOS2 apps
Terminal (built-in) Built-in chmod +x file.exec then ./file.exec . If Gatekeeper blocks it, allow it under System Settings → Privacy & Security.
file command (inspect first) Built-in Run 'file file.exec' to confirm it is a Mach-O binary or a script before running.
Linux3 apps
Shell / terminal (built-in) Built-in chmod +x file.exec then ./file.exec - sets execute permission and runs it.
file command (inspect first) Open-source Run 'file file.exec' to reveal whether it's an ELF binary, a script, or something else before running it.
Text editor (for scripts) Open-source If 'file' reports a text/shell script, open it in any editor to read it before executing.

Technical details

deep spec
EncodingBinary (ELF or Mach-O compiled code) or plain text (interpreter script with shebang)
Binary format on Linux/UnixELF (Executable and Linkable Format) - magic bytes 7F 45 4C 46 ("\x7FELF") at offset 0
Binary format on macOSMach-O - magic FE ED FA CE (32-bit) or FE ED FA CF (64-bit); fat/universal binaries use CA FE BA BE
Script markerShebang (#!) at byte offset 0 followed by interpreter path, e.g. #!/usr/bin/env python3 - parsed by the kernel before execution
MIME typeapplication/x-executable (Linux binary); application/x-mach-binary (macOS); application/x-shellscript (text script)
Execution controlUnix permission bits - the executable (x) bit must be set; the .exec extension itself is ignored by the kernel
Target platformLinux, macOS, BSD variants (FreeBSD, OpenBSD, NetBSD), Solaris, and other Unix-like systems
Byte orderLittle-endian for x86-64 and ARM (most modern hardware); big-endian on legacy RISC Unix platforms such as SPARC and MIPS
Typical file size1 KB (minimal shell script) to tens of MB (statically linked compiled binary)
Architecture encodingEmbedded in ELF e_machine field (x86-64 = 0x3E, ARM64 = 0xB7, RISC-V = 0xF3) or Mach-O cputype/cpusubtype fields
Code integrityNo inherent checksum in the format; macOS supports code signing via the codesign tool; Linux relies on external GPG or package-manager signatures
CompressionNot built-in to the format; binaries may be UPX-packed or wrapped in a self-extracting shell script
Extension conventionThe .exec suffix is informal - most native Unix executables carry no extension; the OS uses magic bytes, not the filename, to determine how to run the file
Windows counterpart.exe (PE/COFF format) - the extension is mandatory on Windows, unlike .exec which is optional on Unix
Inspection commandThe file command identifies the actual binary type (ELF, Mach-O, or script interpreter) regardless of the .exec extension
ReleasedN/A (extension-less executables predate the .exec label; concept from early Unix)
Latest versionN/A - .exec is a convention, not a versioned format
Specificationrefspecs.linuxfoundation.org

EXEC conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with EXEC files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about EXEC files.

Frequently asked questions

What is a .exec file?
It is a Unix/Linux/macOS executable - a file meant to be run as a program. Inside it is either a compiled binary (ELF on Linux, Mach-O on macOS) or a text script. The extension is just a label; Unix decides how to run it from the file's contents and permissions.
How do I run a .exec file on Linux or macOS?
Open a terminal, make it executable with 'chmod +x file.exec', then run it with './file.exec'. On macOS you may also need to allow it in System Settings → Privacy & Security if Gatekeeper blocks it.
Why does my .exec say 'permission denied'?
Unix won't run a file unless its execute bit is set. Run 'chmod +x file.exec' first, then './file.exec'. If it's on a noexec mount (like some downloads folders), move it elsewhere.
Can I run a Linux .exec on Windows or a Mac?
Not directly. A Linux ELF binary needs WSL on Windows, and won't run on macOS at all (and vice versa). Compiled executables are OS- and CPU-specific; you'd need a version built for that system.
How do I know if a .exec is a binary or a script?
Run 'file file.exec' in a terminal. It will tell you if it's an ELF/Mach-O binary or a shell/Python/etc. script. If it's a script, you can open it in a text editor and read it.
Is it safe to run a .exec file?
Only if you trust where it came from. An executable can do anything your account can. Inspect it with 'file' (and read it if it's a script), keep macOS Gatekeeper on, and don't run executables from untrusted emails or downloads.

References

1Microsoft - Windows Subsystem for Linuxlearn.microsoft.com
2Linux Foundation - ELF (Executable and Linkable Format) specrefspecs.linuxfoundation.org

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.JPGJPEG Image
4.PARTPartial Download File
5.MDMarkdown Document
6.RPMSGRestricted Permission Message
7.DATProgram Data File (generic)
8.BINCD/DVD Disc Image (BIN/CUE)
9.EXEWindows Executable (Portable Executable)
10.DBSQLite Database File

Related extensions

.APKAndroid Package
.EXEWindows Executable (Portable Executable)
.VBSVBScript file (Visual Basic Script)
.JARJava Archive
.EX4MetaTrader 4 Compiled Program (Expert Advisor / Indicator / Script)
.APPXMicrosoft Windows App Package (AppX)

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z