I have an executable program (no source code, just the compiled executable) that was made in windows (.exe extension). It doesn't use any graphics... it simply reads and writes files. I want to be able to run it in a linux shell script so that I don't have to switch operating systems to get my output. Is there a way to use or convert the executable for linux operating systems?

3 Answers 3


Wine works even for Windows CLI apps.

  • Is there a way to run it without Wine?
    – Paul
    Commented May 2, 2012 at 23:37
  • 1
    Yes. Run Windows. Commented May 2, 2012 at 23:37
  • Obviously... But i'm looking for a way without wine or windows.
    – Paul
    Commented May 2, 2012 at 23:39
  • Rebuild from source. Commented May 2, 2012 at 23:42
  • As I said... no source available...
    – Paul
    Commented May 2, 2012 at 23:43

You can't run Windows binaries (source compiled to run in Windows) on Linux without going through a Windows emulator of some sort.

So if you don't want to run Windows in a virtual machine, or you don't want to run Wine or anything similar, sorry, but it won't run on Linux.

  • I don't really need most of the features of a virtual windows environment (i.e. graphics, etc)... is there a way to get an emulator just for the windows DOS command prompt? That is really all that I'll need to run the program.
    – Paul
    Commented May 3, 2012 at 0:02
  • 1
    Yes. It's called Wine. Commented May 3, 2012 at 0:07
  • 1
    @Paul If what you have is truly a DOS program then dosemu might work. But that's probably not what you have.
    – Keith
    Commented May 3, 2012 at 0:16

Beside wine, as already suggested, a virtual machine like VMware-Player is fine to execute Windows programs, without rebooting.

Jar-files and some mono-applications will not need Wine or a Windows, running in a VM, but we wouldn't call that Windows executable.

A windows-executable, which runs in the shell, is most of the time still a windows executable, and won't run on DOS. Don't let the user interface fool you! They will report 'This program will not run in DOS-mode' or similar.

  • Regarding running CLI win32 executables, from a real Free-DOS/MS-DOS, it can be done, although some limitations do apply. Specifically check out HXDOS japheth.de/HX.html, it also includes a utility named PatchPE, which will convert binaries from Win32-PE to DOS-PE. Commented Jun 11, 2013 at 14:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .