LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-07-2014, 06:00 PM   #1
jkl123
LQ Newbie
 
Registered: Dec 2014
Posts: 5

Rep: Reputation: Disabled
.exe file


Why doesn't Linux have .exe files? It would seem that this file extension would be a logical thing for any operating system to have. Is it just because windows has .exe files and the Linux people wanted to be different? What is the rationale behind it? Also I noticed that there isn't any .txt files either why is this?
 
Old 12-07-2014, 06:05 PM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,990

Rep: Reputation: 2448Reputation: 2448Reputation: 2448Reputation: 2448Reputation: 2448Reputation: 2448Reputation: 2448Reputation: 2448Reputation: 2448Reputation: 2448Reputation: 2448
Because those are Microsoft Windows Binaries
they will not run on a linux OS

and linux is not windows
the same goes fro Apples Mac
apple will not run MICROSOFT software

well there is wine that is an emulator

Linux and UNIX and apple and sun do not use file extensions to DEFINE what a file is

but feel free to put .txt at the end of any plain text file if you want to

Last edited by John VV; 12-07-2014 at 06:06 PM.
 
Old 12-07-2014, 06:14 PM   #3
timl
Member
 
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 601

Rep: Reputation: 127Reputation: 127
Hmmmm, my experience of exe files goes back to OPENVMS (there is a link between DCL & DOS?). And these would not run on either MS or Linux software.

Linux has more in common with Unix systems where the bin file defines an executable. Someone more historically aware may be able to advise when Unix was first designed (1960s ?). I would guess though it was long before MS came into being.
 
Old 12-07-2014, 06:21 PM   #4
jkl123
LQ Newbie
 
Registered: Dec 2014
Posts: 5

Original Poster
Rep: Reputation: Disabled
Maybe I should rephrase the question and ask it this way. Why doesn't Linux have its own file extension associated with executing a program such that when you double clicked on the file the program ran (the file extension could be .fge for example)?
 
Old 12-07-2014, 06:50 PM   #5
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_10{.0|.1|.2}
Posts: 4,029
Blog Entries: 1

Rep: Reputation: 2114Reputation: 2114Reputation: 2114Reputation: 2114Reputation: 2114Reputation: 2114Reputation: 2114Reputation: 2114Reputation: 2114Reputation: 2114Reputation: 2114
Quote:
Originally Posted by jkl123 View Post
Maybe I should rephrase the question and ask it this way. Why doesn't Linux have its own file extension associated with executing a program such that when you double clicked on the file the program ran (the file extension could be .fge for example)?
Rephrasing doesn't help.

The question is more akin to a former bicycle rider getting into a sports car and asking, "Why doesn't this thing have handlebars?". It is a fundamentally different machine.

Windows identifies binary files as being executable by the file extension, Linux/Unix does not.

Linux/Unix identify a file as being executable by the file permissions and the filename extension is irrelevant for that purpose.

File extensions such as .txt, .html, etc. may be used but have no inherent meaning to the operating system. Programs are usually associated with them by a method covered under the heading of "mime-types", I leave the searching for that term as an exercise.

Last edited by astrogeek; 12-07-2014 at 06:55 PM.
 
1 members found this post helpful.
Old 12-07-2014, 06:51 PM   #6
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Sid, Linux Mint DE
Posts: 4,493

Rep: Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636
Some historical and technical explanation.

Linux follows the Unix file attributes scheme. In the attributes it is set whether a file is executable, and by whom (user, group, others). If the file name starts with a dot, the file is hidden. Unix was designed and went into use in 1969.

DOS saw the first version in 1981. It used a highly simplified file system with simplified attributes. The visibility of the file was moved from the file name to the attribute. The executability of a file was moved from the attributes to the file name. (.EXE and .COM).

So if you talk about doing things different just because it seemed to be useful to deviate from other systems, ask why the DOS designer did that. (No, that was not Bill Gates). Same goes for using the backslash instead of forward slash in path names but that is out of the scope of this thread.

Then two other attributes were added to DOS files: the System and Archive attribute. The System attibute indicated whether a file was important for the system. DOS did not have file owners, so this was the mechanism to prevent deleting system files. The Archive attribute was a flag to signal whether the file was backed up or not. But it only worked with MS Backup.

jlinkels
 
2 members found this post helpful.
Old 12-08-2014, 07:13 AM   #7
Soadyheid
Senior Member
 
Registered: Aug 2010
Location: Near Edinburgh, Scotland
Distribution: Cinnamon Mint 17.3 and 18 at present.
Posts: 1,192

Rep: Reputation: 204Reputation: 204Reputation: 204
One of the reasons, though not the main one, that there are less viruses in Linux than Windows is because if you download a binary file in Linux, the executable flag is invariably NOT set. You'll have to manually set it to run it. Same with scripts. Windows can just run the .exe and you're stuffed!

As usual, this is always worth reading...

Play Bonny!


Last edited by Soadyheid; 12-08-2014 at 07:16 AM.
 
Old 12-08-2014, 08:56 AM   #8
rtmistler
Moderator
 
Registered: Mar 2011
Location: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 4,484
Blog Entries: 10

Rep: Reputation: 1643Reputation: 1643Reputation: 1643Reputation: 1643Reputation: 1643Reputation: 1643Reputation: 1643Reputation: 1643Reputation: 1643Reputation: 1643Reputation: 1643
Linux has EXECUTABLE files, they just don't have the Microsoft/DOS extensions and further as pointed out, the files are compiled to run within the Linux OS versus another OS.

Unix never chose to have a need for a file extension and Linux has persisted with these conventions. Unix PRE-DATES Windows, so I would submit that DOS/Windows chose to add extensions. To go further, they did a horrific job with their original 8.3 file naming conventions too. All just my opinions there.

You technically could compile a source file into an executable for Linux and then choose to name it with a .EXE or .COM extension. It would be confusing to people, but that situation would run on your Linux system.
 
Old 12-08-2014, 09:14 AM   #9
JeremyBoden
Senior Member
 
Registered: Nov 2011
Distribution: Debian
Posts: 1,026

Rep: Reputation: 203Reputation: 203Reputation: 203
If you find it helpful, you could add .sh as a suffix to any executable scripts you create.
It won't bother Linux.
 
Old 12-08-2014, 09:21 AM   #10
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 1,796

Rep: Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619
exe files?

Linux HAS exe files, they somply do not require any particular (or ANY) extension. Tht whole 8.3 thing was a bad choice from day one, but handy for crippled systems like IBMDOS and MSDOS that cannot detect file type or permissions directly. Check out the "file" command under Linux, or any flavor of Unix. You might also learn about the ACL system used under Linux. I think you will find it FAR more powerful and versital than the crippled extension' systems you describe.
 
Old 12-08-2014, 09:31 AM   #11
Toadbrooks
Member
 
Registered: Jul 2008
Distribution: Linux Mint 16
Posts: 81

Rep: Reputation: 11
Quote:
Originally Posted by timl View Post
Linux has more in common with Unix systems where the bin file defines an executable. Someone more historically aware may be able to advise when Unix was first designed (1960s ?). I would guess though it was long before MS came into being.
Long before. Unix was created in 1969, more than 10 years before DOS. Linux and Unix let the contents of the file say how it is used, although as others have noted, the x bit in the permissions says whether it is executable or not.

As others have noted, you can include an extension, if you wish. (I do it, especially for files that I want to be readable to my friends who use Windows) But that doesn't allow or deny anything to Linux about how the file is used or what to do with it.

Sometimes Unix/Linux people aren't as gentle with with former Windows people as we could be. That always reminds me of early programming, when machine language programmers looked down on high-level language programmers. (I was one.) We tended to look down on people who needed the crutch of a high-level language saying, "Real Programmers don't need compilers. We program right down on the bare metal in 1s and 0s."

Of course, the crutch won, and the crutch of Windows has out-performed Unix and Linux, at least in terms of market-share.

It takes some getting used to, but Unix/Linux is simple in its own way. If you go to your home directory (/home/<username>) you can use the Linux equivalent of the DIR command (ls -la | more) and see all your files. We have 'dot' files too, and files that begin with a 'dot' are the equivalent of DOS's Hidden files. (They only appear if you include the 'a' in the 'ls -la' command above.) You may see files with extensions. I have a 'pic.jpeg' in mine as well as a 'killcore.sh'.) The files with the '.sh' extensions are the equivalent of .BAT files in DOS, although there is more than one shell in Linux/Unix, and there are more extensions, for example, .csh, .ksh, .bash, and .zsh.

There is plenty to learn, but it isn't that difficult. Experiment, use Google, read help files and ask questions. I think you'll eventually see that it's more consistent than the way Windows has had to change and adapt as computers became more powerful.

Last edited by Toadbrooks; 12-08-2014 at 09:53 AM. Reason: additional help, maybe.
 
1 members found this post helpful.
Old 12-08-2014, 10:14 AM   #12
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,051

Rep: Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852
http://www.linuxquestions.org/questi...ml#post5200740
 
Old 12-09-2014, 09:25 AM   #13
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,654

Rep: Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255
First use of "exe" extension as executable I saw was on a PDP-10 with Tops-10...In 1973. Turned out it actually came from DEC OS-8. The exe was produced by the compilers... and the com was a renamed exe but allowed it to interface with the command interpreter using the appropriate library calls to access the command parameters. And that went back to around 1968.

The style was taken by RT-11, and then to CP/M and its descendants.

Using permission bits to identify executables is much more secure.
 
Old 12-09-2014, 10:54 AM   #14
neerajkolte
LQ Newbie
 
Registered: May 2014
Location: Pune, India.
Distribution: Fatdog64
Posts: 13

Rep: Reputation: 6
I saw this...
www.howtogeek.com - mime-types-explained-why-linux-and-mac-os-x-dont-need-file-extensions
Also..
www.howtogeek.com - magic-numbers-the-secret-codes-that-programmers-hide-in-your-pc
might be useful.

Thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SQUID Block exe file from https://*****.com/****.exe aamdevan Linux - Server 3 12-05-2013 03:15 AM
Why is MSI file smaller than EXE file? future_computer General 4 12-14-2012 12:16 AM
File Roller 2.32.0 fails to extract .exe file, yet on another machine it does RockSolidAfrican Ubuntu 4 11-14-2011 06:15 AM
Can we convert the .exe file to .rpm file.Any software is there to do it cartti Linux - Newbie 2 06-24-2010 02:34 PM
samba compatibility with microsoft srvtools.exe (usrmgr.exe and srvmgr.exe) checkmate3001 Linux - Software 1 09-06-2008 06:08 AM


All times are GMT -5. The time now is 01:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration