Executable File

An executable file is a type of computer file that runs a program when it is opened. This means it executes code or a series of instructions contained in the file. The two primary types of executable files are 1) compiled programs and 2) scripts.

On Windows systems, compiled programs have an .EXE file extension and are often referred to as "EXE files." On Macintosh computers, compiled programs have an .APP extension, which is short for application. Both types of executable files have been compiled from source code into binary machine code that is directly executable by the CPU. However, EXE files only run in Windows, while APP files only run in Mac OS X. This is because the code is executed by the operating system and therefore must compiled in format that the operating system can understand.

Uncompiled executable files are often referred to as scripts. These files are saved in a plain text format, rather than a binary format. In other words, you can open a script file and view the code in a text editor. Since scripts do not contain executable machine code, they require an interpreter to run. For example, a PHP file can execute code only when run through a PHP interpreter. If a PHP interpreter is not available, the PHP script can only be opened as a text file.

Since executable files run code when opened, you should not open unknown executable files, especially ones received as email attachments. While compiled executable files are the most dangerous, script files can run malicious code as well. For example, VBScript (.VBS) files can run automatically on Windows systems through the built-in Windows Script Host. Likewise, AppleScript (.SCPT) files can run through the AppleScript interpreter included with Mac OS X. Therefore, if you come across an unknown file and are unsure if it contains executable code, it is best not to open it. Below is a list of common file extensions used for executable files on Windows and Macintosh systems.

Windows file extensions: .EXE, .COM, .BAT, .VB, .VBS, .WSF, .PIF
Macintosh file extensions: .APP, .SCPT, .APPLESCRIPT

Updated February 18, 2011

Definitions by TechTerms.com

The definition of Executable File on this page is an original TechTerms.com definition. If you would like to reference this page or cite this definition, you can use the green citation links above.

The goal of TechTerms.com is to explain computer terminology in a way that is easy to understand. We strive for simplicity and accuracy with every definition we publish. If you have feedback about the Executable File definition or would like to suggest a new technical term, please contact us.

Want to learn more tech terms? Subscribe to the daily or weekly newsletter and get featured terms and quizzes delivered to your inbox.

Sign up for the free TechTerms Newsletter

How often would you like to receive an email?

You can unsubscribe or change your frequency setting at any time using the links available in each email.

Questions? Please contact us.