The Windows Subsystem for Linux , WSL, is one of the coolest features to come to the operating system. Thanks to it, users can run a full Linux on top of Windows 10 without the need to virtualize and without anything we do on it endangering our PC and without using virtual machines. Without a doubt, the Microsoft subsystem is something new and revolutionary for Windows 10. However, a developer has been able to go one step further, because who doesn’t want to be able to run Linux from a DOS subsystem ?
Called DSL , a developer has managed to develop a program that will allow us to run an instance of the Linux Kernel directly from MS-DOS . Simply because, to show that it is possible. This developer was inspired by WSL, the Windows Subsystem for Linux, when developing this experiment. An experiment that, the truth, is that it is not something that we are going to use every day, and that its usefulness goes little beyond curiosity itself, but it works. And, in addition, it does it very well.

How DSL works
Broadly speaking, the operation of this subsystem is the same as that of WSL, that is, it allows us to load the Linux Kernel directly from MS-DOS 6.22 (and it also works in FreeDOS), and use the tools of this free operating system, without Get out of Microsoft’s terminal operating system in no time.
When a user runs DSL, the Linux kernel takes control of the PC , and we can start using it. MS-DOS will continue to load into memory, waiting for a shutdown call for DSL and for it to work again in the foreground.
To do this, the developer has taken advantage of a feature present in modern processors, VM8086, which basically allows 16-bit programs to run directly on a 32-bit architecture natively. This is, for example, how the first versions of Windows worked, when they were mere “programs” for DOS.



When the Linux instructions are finished, the subsystem is closed (although it waits for any other calls) and we are back in control over DOS.
All the information, documentation and source code for this experiment can be found here .
How to test the Linux subsystem for DOS
If this experiment catches your eye, you can try it yourself and see how far it can go. Of course, the developer has not offered any ready-to-run binaries, but we will have to compile and prepare them manually ourselves.
To do this, the first thing we need is to have the ” i386-linux-musl ” toolset in the PATH. We will also need to have Linux and Busybox ready s, and a hard disk image, hdd.base.img, that has MS-DOS or FreeDOS on its primary partition.
After executing “make”, the program will generate a new image of the hard disk already prepared with everything necessary to execute DSL . Once we have the new disk, we mount it on the drive we want (and even on a physical PC) and execute the command “C: / doslinux / dsl” to start using this subsystem.