Porting modern software to old hardware that shouldn't be able to run it is a fun way for hackers to challenge themselves. You may have seen the headlines about the person who got Doom to run on a pregnancy test, or Doom Eternal on the Gameboy Color, and other weird ports that just shouldn't work. But getting Windows 95 to run a full Linux subsystem may be the most impressive achievement so far.
A developer named Hailey is behind the project, and has referred to the feat as "one of my greatest hacks of all time." It's called WSL9x (Windows 9x Subsystem for Linux), which doesn't have any actual connection to Microsoft's own WSL. The concept is basically the same, but WSL9x is designed to run on Windows 95, 98, and ME. From an MS-DOS prompt, you type wsl to access the Linux terminal running kernel 6.19. If this had been released in 1995, it would have felt like science fiction.
Microsoft keeps promising WSL will finally feel native, and I'm tired of waiting
WSL works, until your homelab doesn't.
How in the world is this possible?
The engineering behind it is crazy
The way WSL9x works is fundamentally very different from ordinary WSL. It relies on a modified Linux kernel that's been tweaked to cooperate with Windows 9x instead of running on its own. Another component is a VxD driver (the old type of low-level system driver that Windows 9x used), which loads the Linux kernel and keeps things running. The last piece of the puzzle is a small program dubbed wsl.com that bridges the gap between the Linux side and MS-DOS prompt native to Windows 95.
Windows 9x is so old that it doesn't have a way to handle Linux's method of making internal system requests. The developer circumvented this roadblock by coding the Linux side to issue an error whenever the kernel needs to make a system call. Windows 95 doesn't have a way to handle the specific error that the Linux side produces, which would normally be bad news, but the VxD driver is watching for that particular fault and intercepts it before Windows can complain. The VxD driver then handles the request on Linux's behalf and passes the result back. Windows never knows the difference, so the Linux kernel can make its system calls without causing problems.
The Linux kernel runs with Windows 9x in ring 0, which means that both operating systems share the same hardware resources and have the same CPU privilege level. The drawback of this configuration is that if one OS crashes, they will both go down. It sounds like a pretty reasonable trade-off to make such an improbable setup work. I appreciate the unique problem-solving that went into making Linux work on Windows 95, but these workarounds and their resulting caveats make it sound like the subsystem is quite fragile. That said, it's honestly shocking that it even works at all.
But why bother?
WSL9x is far from practical
This wasn't really built as a solution to anything. I don't think anyone will find it useful, but some might get a kick out of trying it out as a fun experiment. The same can be said for a lot of the other retro-computing hacks floating around. While it's entirely unconventional, it demonstrates how flexible the Linux kernel really is, and how durable the old Windows 9x architecture turned out to be. The project took Hailey six years to realize, so it's safe to call it a labor of love for tinkering. It goes to show what kind of absurdity a developer can pull off when they're chasing an idea for the fun of it.
There's ironic timing to the project, too. Linux's upcoming 7.1 kernel will kill support for the i486 processor entirely, meaning that WSL9x might be the last project to put a modern Linux experience onto the ancient chip. It's a bonus that Linux gets to run inside an equally ancient operating system. Despite its impracticality, it's an interesting sendoff to the Linux kernel's i486 compatibility.
WSL has come a long way from where it started
It's interesting to reflect on how far the WSL concept has traveled since its debut. In the late '90s and early '00s, Microsoft referred to Linux as a "cancer" and sent out internal memos about strategizing against it. Since then, Microsoft released WSL 1, which was just a compatibility layer that translated Linux syscalls into Windows NT kernel calls. WSL 2 overcame those limitations with virtualization, and now Windows users can run a full Linux kernel that integrates with their OS.
WSL9x took things full circle, bringing the concept all the way back to Windows 95. It only took thirty years and one very stubborn developer to close the loop. What would be harder to believe in 1995, that Microsoft would go on to support an open-source Linux subsystem, or that the concept would be backported to Windows 95 in the future?
