What is the most simple explanation for the fact that Windows applications are not Linux-compatible?

6

2

What can you respond to someone who asks you:

...And why can't I install a Windows application on my Linux computer?

bAN

Posted 2009-07-25T16:52:29.027

Reputation: 1 646

Answers

17

You could use the "human language" as an analogy.

Windows programs talk to Windows OS using the Windows API, the API is like a language.

Linux programs talk to the Linux OS using another language, the Linux API. Linux doesn't "speak" Windows API, Windows doesn't "speak" Linux API.

There are ways to make Linux understand Windows API, like installing Wine as a translator.

lexu

Posted 2009-07-25T16:52:29.027

Reputation: 1 822

you beat me to it. Nice answer. – Babu – 2009-07-25T17:19:39.350

9

To improve the "human language" analogy a little:

Every time a program needs to display something on the screen (a window, text, picture, menu, button...), read a file from disk, connect to a network, make a sound, do something when a user clicks the mouse or when the user types something, every time a program needs to do that, it must ask the operating system to do it. In fact, talking to the operating system is what a program does most of the time.

Both Windows operating system and Linux operating system can do all of that easily, but since they were created by different people, they both do it in a different way and also the program needs to ask for those services in a different way. The languages that Linux and Windows speak are completely different.

hopsasa

Posted 2009-07-25T16:52:29.027

Reputation: 240

3+1 for not mentioning "API" – ChrisF – 2009-07-25T17:47:29.813

0

Well, first of all, there's Wine.

Second, it's (put simply) because the applications use system functions, and each system is different, so they're not compatible.

jtbandes

Posted 2009-07-25T16:52:29.027

Reputation: 8 350

0

How about a car comparison/analogy? All car are the same, but some use Unleaded fuel and some use Diesel fuel. You can't run diesel in an unleaded engine.

WireGuy

Posted 2009-07-25T16:52:29.027

Reputation: 1 681

1"Why can't you run diesel in an unleaded engine?" – Peter Boughton – 2009-07-25T18:35:16.970

1I prefer "Why cant you put a Chevy engine in front of a Toyota transmission?" – dmckee --- ex-moderator kitten – 2009-07-25T19:09:54.017

I don't even know what a Chevy engine is!

If you're explaining to a car fan, then a car analogy is good; if you're explaining to a random regular person, you're just adding to the confusion. – Peter Boughton – 2009-07-25T20:37:44.617

3-1 It's a car analogy. – Richard Hoskins – 2009-07-25T22:02:03.230

Peter, I believe unleaded has a higher octane (more refined) than diesel. Luckily you can't fit a diesel nozzle into a car that takes unleaded gas. I think many people understand there is 2 kinds of gas, probably more than understand a sentence that uses the phrase API. – WireGuy – 2009-07-25T22:44:56.917

2What is "gas"? I put petrol in my car. This comment discussion is a good example of why the "human language" analogy is a far more sensible method than trying to use US-centric car terms. – Peter Boughton – 2009-07-29T13:05:14.143

0

Update - 2019

This post from 2009 is no longer strictly true after 10 years have passed.

Windows exe on Linux

Very many Windows apps work correctly on Linux using WINE, which has evolved a lot in the last 10 years. WINE supplies the library that translates Windows system calls to Linux and understands the exe format.

Linux on Windows

With Windows Containers and Windows Subsystem for Linux (WSL), Windows 10 can run Linux-based containers and programs, and rather efficiently, too.

harrymc

Posted 2009-07-25T16:52:29.027

Reputation: 306 093

Read the question carefully. OP was asking a response to "why can't I install a Windows application on my Linux computer?", which means the host machine is Linux and not Windows. From WIkipedia: Windows Subsystem for Linux (WSL) is a compatibility layer for running Linux binary executables (in ELF format) natively on Windows 10 and Windows Server 2019.

– None – 2019-11-23T08:46:25.803

@clearkimura: Windows apps do work correctly on Linux using WINE. Answer extended. – harrymc – 2019-11-23T09:54:01.373