// the find
haileys/doslinux
Run Linux programs on DOS
This runs a Linux kernel and a busybox userland in the 386's virtual-8086 mode alongside MS-DOS, so you can run Linux commands from the DOS prompt through a single dsl command. It is for people who want a WSL-style setup on period hardware or in an emulator, and for anyone curious how much real-mode plumbing a Linux guest needs to talk to DOS.
- The guest configs are checked in (linux-config-doslinux and busybox-config), and script/build-prereq builds the kernel and userland from them, so the userland doesn't depend on hand-tuned configuration.
- The guest code is split into small modules. The vm86 monitor (init/vm86.c) is separate from keyboard and terminal handling (kbd.c, term.c), which makes it easier to see where DOS stops and Linux starts.
- The DOS-facing surface is one entry point, a dsl command that runs a Linux command and can be placed on PATH, so the rest of the DOS environment isn't asked to change much.
- You have to supply your own hard drive image with MS-DOS already installed on the first partition, plus an i386-linux-musl cross toolchain. There is no ready-made image to download, so a first run means building from source.
- The last push was in July 2022. If the musl cross toolchain or the kernel config has moved on, expect to fix the build yourself.
- The README doesn't cover memory requirements, which Linux programs actually run, or how files and networking work between the two systems. Those are the first questions anyone evaluating this will ask.
- The build is a Makefile and shell-script workflow that appears to assume a Unix host, though the README doesn't say so outright. A Windows user would need a WSL or VM step before they could build the image.