I don't know what the exact executable file extension is. Is it
I don't know what the exact executable file extension is. Is it
There is no standard File-Extention like an ".exe" file in Windows.
On Linux nearly any file can be executable. The file ending just describes (but not necessarily) what or how a file is "executed".
For example a shell script ends with .sh and is "executed" via the bash shell.
In your question you ask for .deb and .tar.gz Well, the .deb file installs software on your system (Please be careful!) And the .tar.gz file is a compressed file like a .zip that you could know from Windows.
I would summarize the system in the following way:
Any file that starts with
#!(called a shebang or hashbang) on the first line is just a script. The path after the shebang is a path to the program (executable) that needs to parse the script, assuming that the execute permission has been set on the file with
chmod a+x filename.
Therefore, answer your original question, there is no extension, or rarely, it is
This has been made Community Wiki, so anyone can add an entry.
The concept of an executable is different in unix/linux than Windows.
Anything that ends in
.com becomes an executable file.
Each and every file has an executable bit, so any file can be executed, unlike Windows. To see if a file is executable, you can check its properties (Permissions tab), or even see them marked in the terminal (they are all marked with a *).
Even text files (like shell scripts) can have their executable bits set, and be run as one.
To find out what a UNIX operating system thinks a particular file's type is, you use the file command:
$ file /bin/ls /bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1, for OpenBSD, statically linked, stripped
In the above example, I give the path to the program 'ls', you would replace with the path of your file.
A script file would look like:
$ file script.sh script.sh: Bourne-Again shell script text
A random text file:
$ file textfile textfile: ASCII text
An archive file:
$ file rsync-3.0.6.tar.gz rsync-3.0.6.tar.gz: gzip compressed data, from Unix
It is even smart enough to correctly identify a windows program, should you happen to have one lying around on your UNIX box:
$ file FMZsetup.exe FMZsetup.exe: MS-DOS executable (EXE), OS/2 or Windows
And when it can't figure out what a file is (but is able to open it), it calls it data:
$ file myrandom myrandom: data
File execution on Linux isn't related at all to the file name or extension. Any file can potentially be executed, provided that it's handled by the kernel's
binfmt mechanism (and that its executable permissions are set).
Another common mechanism is the "Shebang" system, handled by
binfmt_script, which looks for
#!/path/to/interpreter at the beginning of the file.
If you fancy doing a bit of kernel programming, you can even write your own.
Although not directly related, the
file command should tell you whether a file is an ELF executable or something else.
The naming convention has nothing to do with the executable status of a file (except when it's used for
binfmt_misc registration). They're just conventions. Typically, a
.exe file found on Linux could be a mono application, getting the
.exe extension as a convention coming from the Windows/.Net world.
The other aspect that can happen when you want to "run" a file is to have the file explorer tool that you use register extensions to be able to launch a program that will open these files. This is what would happen if you double click on a
.deb, for example: the files are not executables nor executed, but what you use to double-click chooses which executable to launch to open these files.
In windows, an .exe file is a computer file that ends with the extension ".exe" commonly known as executable file. When one clicks on an exe file, a built-in routine automatically executes code that can set several functions into motion. Exe files are commonly used to install files in the windows operating system.
Additionally, you have .tar files,commonly known as compressed files.Linux versions, such as Ubuntu use features prominently in various software distributions, with most software source code made available in the tar.gz format .From that you can assume that tar.gz is a form of the well know .tar format, which is used for archiving.
In Ubuntu on the other hand, the .deb file format is the one that behaves more like the .exe file in windows.When you open it the software center handles it's code and installs the program it contains, such as an executable file.
Even though you can still install software and packages from source format ( tar.gz), the best suited format for installing software is the .deb one.Take as example the Ubuntu Software Center; all the applications it contains are in fact .deb files.In general, in linux, almost every file format(including .deb and tar.gz as well as the well know bash files .sh) can behave as an executable file so that you can install packages or software with that.
There is no equivalent to the exe file extension in Windows to indicate a file is executable. Instead, executable files can have any extension, and typically have no extension at all.
Linux/Unix uses file permissions to indicate if a file may be executed. Specifically, there is an execute file permission that tells the system that this file is allowed to be executed. However, the absence of this permission does not indicate that the file isn't an executable; merely that the relevant user is not allowed to try to execute it. Similarly the presence of this permission does not always indicate that the file is a valid executable.
Linux/Unix has a binary executable file format called ELF which is an equivalent to the PE (Windows) or MZ/NE (DOS) binary executable formats which usually bear the extension .exe
However, other types of files may be executable, depending on the shell. Typically, if you try to execute a file that the system does not recognise as a binary executable (eg, ELF format), then it is interpreted by the current shell interpreter. This fulfills the same effect as batch files in Windows or DOS, except that again, it is not the extension that identifies its type or how to execute it.
Shell files may optionally begin with a hashbang (first two characters in the file are
#! followed by a path to an interpreter) in which case rather than interpret the rest of the file with the current shell interpreter, it can launch an alternative shell or interpreter to execute the file. Thus, you can have a script in any interpreted language and still have it run with the correct interpreter when trying to execute the script.
EXE and DLL files are portable executable files. These are based on the PE/COFF unix files.
Read http://en.wikipedia.org/wiki/Portable_Executable for more information.
In Ubuntu you don't have a specific extension for an executable file. These are generally files that are named after the application they relate too.
The important factor is that these files have the executable bit set. If you have a color terminal you will notice that these are a different color when listed using
In the unix file system binary executable files are generally stored in there own location.
- /bin (core binaries)
- /sbin (system binaries)
- /usr/bin (application binaries)
whereas other application resources may be stored in /usr/lib/ or /usr/share/
A deb file is more correctly corresponded to an msi file in windows (i.e a package installer).
Generally tar.gz files or bz2 files contain source code from which an application can be built
Ubuntu equallant of .exe / .com file is extensionless file, usually some extensions like .bin ,.run etc are added to it for covinience
there are several alternatives for .bat file(almost all files),the most popular one is .sh
.deb is just an archive binary files(similar to .msi in windows) with debian standerds
.tar.gz is just a common archiving format used in ubuntu
Any filename can be set to executable regardless of extension, but the file needs to have the appropriate permission set. The permission may be given by right-clicking the file in Nautilus, clicking Properties, and ticking the "Allow executing file as program" checkbox:
.deb Debian Package for Linux and TAR archive compressed with the standard GNU zip (gzip) compression algorithm; contains one or more compressed files; commonly used on Unix operating systems to package files, programs, and installers.
NOTE: TAR.GZ files must first be decompressed and then expanded using a TAR utility. They include both .TAR and .GZ file types.
protected by Community♦ Aug 17 '17 at 5:08
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?