Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 9 down vote accepted

Wine works even for Windows CLI apps.

share|improve this answer
Is there a way to run it without Wine? – Paul May 2 '12 at 23:37
Yes. Run Windows. – Ignacio Vazquez-Abrams May 2 '12 at 23:37
Obviously... But i'm looking for a way without wine or windows. – Paul May 2 '12 at 23:39
Rebuild from source. – Ignacio Vazquez-Abrams May 2 '12 at 23:42
As I said... no source available... – Paul May 2 '12 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.

share|improve this answer
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 May 3 '12 at 0:02
Yes. It's called Wine. – Ignacio Vazquez-Abrams May 3 '12 at 0:07
@Paul If what you have is truly a DOS program then dosemu might work. But that's probably not what you have. – Keith May 3 '12 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.

share|improve this answer
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. – TechZilla Jun 11 '13 at 14:44

Your Answer


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.