LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-02-2001, 09:27 AM   #1
loop
LQ Newbie
 
Registered: Nov 2001
Posts: 1

Rep: Reputation: 0
Question linux .exe?


What is an executable file extention in linux? In windows it is a .exe or could even be .bat. Is it the same, or if/can an .exe run under linux?

-Thanks, Loop
 
Old 11-02-2001, 09:55 AM   #2
syxxpac023
Member
 
Registered: Aug 2001
Location: Knoxville, TN
Distribution: RedHat 7.1
Posts: 61

Rep: Reputation: 15
Actually... Linux doesn't use file extensions. You just have the set the permissions of the file to executable using chmod. I don't think that Windows executables will run in Linux. You'll probably have to find a Linux version of the program you are wishing to run or get software that allows you to do this which I'm not well versed in but I thought I'd offer a few words to get you started at least.
 
Old 11-02-2001, 10:55 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
seems to me that the whole establishment of .exe just stems from the joint fact the 1) DOS was always very simple, and b) FAT32 is just plain lame, and still relies on a couple of letters to say wether the file is a program or not. which is a bit lame really.

linux and all unix variants, and pretty much all decent OS's use a better system of attributes to define such a thing. File extensions are still frequently used in linux, but really only for information to the user, not the os. you can still call a file what you want, and give it to an app, and it'll do what it can with it...

linux and windows are different operating systems, and have next to nothing in common as far as the user can see really. programs compiled on one system will not work on the other natively. Brain surgeons and jet pilots might both be very clever people, but tell a surgeon to fly this plane to cuba... and he'll be stuffed...

to run windows app on linux, you're only optino is to use wine, unless you pay money for win4lin etc... but wine is well.. a bit toss. runs office fine tho
 
Old 11-02-2001, 11:57 AM   #4
Citizen Bleys
Member
 
Registered: Mar 2001
Location: Moncton, NB
Distribution: Gentoo 2006.0
Posts: 181

Rep: Reputation: 30
Usually anything with the extension .sh, .pl, or .php will execute, but it's not the extention that makes it executable. Load the file into a text editor and you'll see a line that looks like this:

#!/usr/bin/perl

which tells the OS where to look for the script interpreter. Those aren't really executable files, though, but <i>scripts</i>, which are like .bat files for Linux.

EDIT: Want a good script? Create a file with the following contents: (between the dashed lines, not including the dashed lines)
-----------------------
#!/bin/bash

./configure
make
make install
---------------------------

Save it with any name (i.e., install.sh), and chmod it to be executable (i.e., chmod 777 install.sh), then put it somewhere in the path (/bin would work). Then you can install any tarball software with one command.


Last edited by Citizen Bleys; 11-02-2001 at 11:59 AM.
 
Old 11-02-2001, 12:34 PM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
hmm, i personally wouldn't touch that script with a big stick... well not without some error checking... what if ./configure fails?

./configure
if [ $? -le 0 ] ; then
make;
if [ $? -le 0 ] ; then
make install;
fi
fi

ahh that's not quite right.. but you get the idea....
 
Old 11-02-2001, 01:09 PM   #6
isajera
Senior Member
 
Registered: Jun 2001
Posts: 1,635

Rep: Reputation: 45
it wouldn't do too much harm. probably. the only problem the script would have is during make install - if the user isn't root, it might not have permission to install at certain directories. but, if configure fails, then make will fail too, and make install won't get nearly as far.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
.exe on linux domon#1 Mandriva 2 07-04-2005 07:48 PM
why .exe not work in linux mili Linux - Newbie 5 06-16-2005 11:58 PM
.exe in linux? zfmt Linux - Newbie 4 12-02-2004 10:26 PM
How to get .exe to execute in linux stardog2112 Linux - Newbie 2 11-18-2003 10:03 PM
If *.exe for Windows what is for LinuX? Nukem Linux - Newbie 4 10-05-2003 05:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:31 AM.

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
Open Source Consulting | Domain Registration