What is the equivalent of a binary executable (exe) as in Windows for Linux? by @t3nsor
Answer by Brian Bi:
Linux does not use file extensions to distinguish executable files.
When you try to execute a file, the kernel first checks whether you have permission to execute the file. This is determined by the filesystem permission bits. (Example: a file with permissions
0644can't be executed by anybody.) If this check fails, no further processing is done.
If you really do have permission to execute the file, then the kernel searches for a handler that recognizes the executable format. All modern Linuxes will recognize the ELF executable format; some may have support for the old a.out format  or other, more obscure formats. Wine installs a handler that is capable of executing Windows
.exefiles. In addition, all Unix-like systems, including Linux, will recognize the shebang line (beginning with
If there's a handler that recognizes the file, that handler parses the program headers, loads the image into memory, and so on. If not, an error is returned.
For technical details, see 
 Note that the file
a.outproduced by the C compiler is not necessarily in the a.out format; the name is a historical relic.