Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am new to Linux. I am currently trying to write a command line which should execute a *.exe inside a folder abc.

I have tried

% cd abc info.exe

But the error says no such file or directory.

Any suggestions?

share|improve this question

migrated from stackoverflow.com Sep 29 '09 at 22:24

This question came from our site for professional and enthusiast programmers.

5 Answers 5

try:

abc/info.exe

but if it's really a Windows program, you will need to install "wine", then do:

wine abc/info.exe

but only some Windows programs will work under wine.

share|improve this answer
    
And you will probably have to install WINE as well, seeing as it's not default installed in most distros –  Diablomarcus Sep 29 '09 at 23:04

you can't :) exe is Microsoft only. now if you had a linux executable you could do:

cd folder
chmod +x file
./file
share|improve this answer
    
This is false in general. Many Windows and DOS EXEs can be run on Linux using emulators such as wine or dosbox. –  Susam Pal Nov 18 '13 at 11:11

On Linux you give the file executable permissions. It isn't the extension that determines whether or not it can be executed (as on windows.)

Assuming you have a valid file that can be executed in Linux, (not a windows/dos file) do this:

cd abc
chmod a+x info.exe
./info.exe

Note that you need the leading ./ for the shell to find the file in the current directory!

This really belongs on superuser though.

share|improve this answer
1  
COuld you explain me. What you are trying to do as Im new –  alice7 Sep 29 '09 at 22:24
2  
The first line changes the directory, the second line tells linux it is executable, the third runs the program. –  Byron Whitlock Sep 29 '09 at 22:35

This anwswer is combining other answers in to this question into one.

The info.exe file will either execute under Linux or Windows, but not both.

Executes Under Windows

If the file is a windows file, it will not run under Linux on it's own. So if that's the case, you could try running it under a windows emulator (WINE). If it's not compatible with wine, then you won't be able to execute it under Linux.

Before you can start, you will need to install wine. The steps you need to install wine will vary on the linux platform you are on. You can probably google "Ubuntu install wine", if for example, you're installing ubuntu.

Once you have wine installed, then you'd be able to execute these commands.

cd abc/
wine info.exe

Execute Under Linux

if you know this file to run under linux, then you'll want to execute these commands:

Change to your abc directory

cd abc/

Then you'll want to change permissions to allow all users to e**x**ecute this file (a+x).
you could also allow just the user to e**x**ecute (u+x)

chmod a+x info.exe

Launch the program, the ./ tells the command line to look in the current path for the file to execute (if the 'current' directory isn't in the $PATH environment variable.

./info.exe
share|improve this answer

.exes are generally Windows executables, not linux ones. To run those, use something like WINE.

Otherwise, to run a Linux executable, there are many ways, e.g.:

  1. cd abc; ./info.exe
  2. ./abc/info.exe
  3. /full/path/to/abc/info.exe
  4. Add "abc" to your PATH, then just run it as a normal command. ...
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.