How to convert a linux executable file (binary) to windows exe file? How to convert a linux executable file (binary) to windows exe file? windows windows

How to convert a linux executable file (binary) to windows exe file?


You can not convert a linux executeable into a windows executeable.But you can compile the source with cross-compiler.

E.g: MinGw32

if you are in ubuntu:

sudo apt-get install mingw32i586-mingw32msvc-cc main.c -o main.exe


There are no means to convert the binary.

Regular ways to go are:

  • Recompile for other platform, but this requires the source (and cross-platform support in the source or the used libraries must be available on the other platform as well). cygwin/mingw, for example, can help providing the required support/libraries.

  • wine could be used to run Windows binaries on Linux (but not the other way around)


If you have the lastest windows 10. Just install linux subsystem in the appstore. you can run whatever linux binary in windows you want