• herrvogel@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    13 hours ago

    It’s a translator. Takes commands that are meant for windows to understand, and translates them into something Linux can work with. If the program requires the services of the kernel, for instance, it makes its system call as usual but the call gets converted to a command for the Linux kernel. At the end of the day it’s the Linux kernel doing the work that was aimed at the windows kernel, and there is no windows kernel anywhere at all. That’s unlike an emulator where you’d be running the windows kernel inside your Linux environment.

    Wine also creates a windows-looking file structure so that programs can find the stuff they’re looking for where they expect them to be. Like, it creates a “program files” directory somewhere in your filesystem and tells the windows applications to look there if they need to. There’s more to it, but you get the gist I hope.

    In a way, wine extends your Linux environment to support windows stuff. Whereas an emulator would create a new windows environment entirely. The goal is not to trick software into thinking it’s on a windows machine, it’s to make it work on Linux. The difference there is that by making it work on Linux you can make it work together and share resources with the rest of the system instead of remaining isolated in its own emulated environment.