WSL9x Brings Modern Linux to Windows 95

A non-Microsoft enthusiast implemented the WSL9x toolkit (Windows 9x Subsystem for Linux), allowing users to run modern Linux kernels inside the Windows kernel 95/98/ME. This project enables running Linux and Windows 9x applications side by side on one system, similar to the WSL layer that works with Linux applications in modern versions of Windows. However, only Linux console programs are supported by WSL9x. The component’s code is written in C and assembler and distributed under the GPLv3 license.

WSL9x operates differently from WSL2 as it does not rely on virtualization. In WSL9x, the Linux kernel runs in a zero protection ring concurrently with the Windows kernel, making it compatible with systems lacking hardware virtualization support, including those with a CPU i486. The system employs a modified Linux kernel 6.19, compiled to function in UML (User-mode Linux) that enables running the kernel as a user process. This setup replaces the call to the POSIX API in the UML translation layer with a call to the Windows 9x kernel API.

The VxD driver provided by the project is loaded into Windows to initialize the WSL9x subsystem. The driver manages loading and placing the Linux kernel in memory, dispatching interrupts, transferring control to the Linux kernel in cooperative multitasking mode, and processing user space events directed at the Linux kernel, such as system calls and accessing unallocated memory pages (page faults). Since the Windows 9x kernel lacks support for an interrupt vector table (IDT), preventing the installation of its own interrupt handler 0x80, a GPF (General Protection Fault) handler is utilized for system calls to intercept exceptions resulting from executing the SYSCALL instruction.

Users can utilize the wsl.com utility, a 16-bit DOS application that enables running Linux programs through the MS-DOS command line. This utility facilitates input event transmission, simulates console functions for displaying output, and supports ANSI escape codes.


/Reports, release notes, official announcements.