12 ms·
DOS Subsystem for Linux
- plus 6y agoThere are a ton of comments here that seem to be misunderstanding what this software is. This creates a WSL-like environment on a DOS host system. It does not create a DOS environment on a Linux host. I'm not sure where this misunderstanding even comes from; the name is perfectly analogous to WSL.
- xpressvideoz 6y agoYeah, I got that too. It was clear that the name was a parody of WSL.
- freedomben 6y agoIndeed, this confused me as a Linux user who hasn't used Windows in over a decade (and therefore is unfamiliar with the terminology). Thank you. I was reading this as a potential DOS Box alternative to run on Fedora. If the project maintainer is reading, it would be super helpful to put that at the top of your REMADME.md. I'll even send you a PR. FTR it's not your fault the terminology is confusing :-)
- kevinmgranger 6y agoIt's because the WSL name is also confusing.
- petercooper 6y agoI know what it means and what way round it is now due to repetition, but WSL struck me as a weird name and confused me at first. Usually, saying "for Linux" or "for Windows" about something means there's a thing that is for (or "to run on") Linux or Windows, not that the thing is "of" Linux or to enable the use of Linux. I appreciate there are two ways to look at the semantics, but the one they picked for WSL seems the least common one to me.
- iherbig 6y agoI would imagine it's because WSL is a terribly confusing name itself for a lot of people. There are two ways to read "Windows Subsystem for Linux": 1. This is a subsystem that runs on Windows that enables Linux binaries. 2. This is a subsystem that runs on Linux that enables Windows binaries. The confusion comes in the fact that when I write those two sentences, I naturally want to write "This is a subsystem FOR Windows..." or "This is a subsystem FOR Linux... ." I had to consciously avoid using "for" in that sentence to highlight the problem. So when someone who doesn't know what the thing does reads "Windows Subsystem for Linux" they may walk away with the false impression that the subsystem allows Windows binaries to run on Linux. Likewise, what you're seeing now is that people are seeing "DOS Subsystem for Linux" and thinking that this enables you run DOS on Linux.
- detaro 6y agoThe WSL terminology really only makes sense if you are aware that Windows has the concept of subsystems - and which is why swapping other labels makes even less sense. I.e. the run-Windows-on-Linux thing would probably not be called Linux Subsystem for Windows, because what is a "Linux Subsystem"? And of course WSL2 isn't a subsystem anymore, but is stuck with the product name. ¯\_(ツ)_/¯
- tobinfricke 6y agoI was under the impression that the name arose out of trademark requirements. https://news.ycombinator.com/item?id=14093517 https://news.ycombinator.com/item?id=14093517
- freeone3000 6y agoWindows has had subsystems since the OS/2 era, and WSL1 was actually such a subsystem. Initrix was the Microsoft POSIX Subsystem.
- EvanAnderson 6y agoThere was a POSIX subsystem in Windows NT before Microsoft acquired Interix (which became Windows Services for Unix).
- gravitas 6y agoGrammatically, I read the title and thought "yes! finally a way to run those Dell firmware updaters instead of using FreeDOS boot sticks" and then read the comments to find out it's backwards in nature. The phrase is "bad English" in a colloquial sense.
- rcoveson 6y agoThey're both phrased unnaturally, IMO. The suffix "for Linux" strongly implies it's software for use on Linux. It's like the "4j" and "4win" suffixes, implying software built for the Java and Windows environments, respectively. What's more, Windows or DOS as an adjective of subsystem bind more tightly than "for Linux". So if you were to start dropping parts of the name, you'd drop "for Linux" first. Except you can't, because then it's just the Windows Subsystem. LSW would have been a much more natural name. In a conversation about Windows subsystems, you could refer to it as the Linux Subsystem. If other operating systems picked up on the idea, they would have their own Linux subsystems, e.g. Linux Subsystem for macOS. If you wanted to check if your OS had anything like it, you could search "is there a Linux subsystem for FreeBSD?" Which might turn up results about the Linux ABI in FreeBSD. Speaking of which, imagine if it had been named the FreeBSD ABI for Linux. What an awful pattern! You can't even repeat the pattern unless both modifiers are proper nouns! Could you have called the VFS Subsystem the "FreeBSD Subsystem for VFS"?
- reaperducer 6y agoThey're both phrased unnaturally, IMO. This is why we teach sentence diagramming in elementary school. Maybe the person who came up with "WSL" wasn't a native English-speaker?
- WorldMaker 6y agoSomething that should come up early in sentence diagramming but often isn't explained well enough is that sentence diagrams aren't context free, often can be ambiguous, and depend on the context of the speaker to determine referents. Sentence diagrams in the real world are rarely as easy as elementary school examples. In this case, the context known to the speaker but often missed when trying to "sentence diagram" WSL involves the part "Windows Subsystem". That referent, to which the original author was quite familiar, is invoked in WSL as a single noun in part of the larger noun phrase, and while you could continue to sentence diagram break "Windows Subsystem" into constituent parts here, it is important to remember it as a single connected "atom" to which "for Linux" modifies in the overall noun phrase of "(Windows Subsystem) for Linux". Given that context/referent, the sentence diagram here is unambiguous to the original team/"speaker". It's the audience with much less familiarity with the referent/context in question that has ambiguity problems in trying to "sentence diagram" the noun phrase.
- shmerl 6y agoWhy not compare it with Wine instead? Besides, latest WSL is not like that anymore, it's a hypervisor running a VM now.
- gabereiser 6y agoI've been fielding these questions all day. Saying the same thing. It's for "DOS" so you can run _bash_. Ok? People got all excited for Prince of Persia... smh. +1
- em-bee 6y agoi think the confusion comes from the phrase "for those who prefer a DOS environment". maybe it could be phrased as "for those who want linux but need to run DOS as their main OS"
- ogre_codes 6y agoNext up is Microsoft's browser: Windows Subsystem for HTML
- Aperocky 6y agoHave you heard of the HTML5 supercomputer? https://twitter.com/Html5Nikola https://twitter.com/Html5Nikola
- ogre_codes 6y agoMaybe he should be in charge of naming at Microsoft, can't do worse
- Thorrez 6y agoIf it's an HTML5-based device that runs Windows[1] then it's "HTML5 Subsystem for Windows" going by Microsoft's phrase structure. [1] https://copy.sh/v86/?profile=windows98 https://copy.sh/v86/?profile=windows98
- shmerl 6y agoIt says "DOS subsystem for Linux". The way I'm reading it: 1. It's for Linux (so Linux is the host). 2. It creates some subsystem that runs DOS (either emulated, virtualized or translated like Wine is doing for Windows on Linux). That can allow running DOS games on Linux for example, instead of using DOSbox for it.
- antihero 6y agoWould prefer me some LSD to be honest.
- tus88 6y agoWuts WSL?
- jlgaddis 6y agoThe poor naming convention goes back ~20 years or so to (at least) "Windows Services for UNIX" (SFU) [0]. The naming was not intuitive then and it still isn't today. The "problem" is that these products are not what you automatically assume they are! To illustrate: SFU provided NFS and NIS servers, a cron daemon, a telnet server, and various CLI "utilities" (i.e., standard "services" provided by "UNIX") running on Windows -- not Windows services that run on UNIX! Once you know that, the "Windows Services for UNIX" name kinda makes sense and helps to understand what the "Windows Subsystem for Linux" and, now, the "DOS Subsystem for Linux" actually are. --- [0]: https://en.wikipedia.org/wiki/Windows_Services_for_UNIX https://en.wikipedia.org/wiki/Windows_Services_for_UNIX
- mattnewton 6y agoIt’s because the WSL is confusing and doesn’t follow english naming conventions. “X subsystem for y” reads left to right as X is an adjective describing the subsystem, and for seems to indicate y is the platform that X subsystem is for. Instead it’s seemingly meant to be parsed inside-out with “subsystem for Linux” as one noun indicating a subsystem that runs Linux apps, and DOS as an adjective describing that noun. Maybe wsl did it to keep the windows brand first? Are there many other “windows subsystems for Y” out there and this is a Microsoft-universe term? I don’t know but it’s very strange.
- m463 6y agoMaybe it's wishful thinking that the embracing and extending can be recursively embraced. :)
- dboreham 6y agoThe misunderstanding comes from choosing a name for it that stongly implies it is not the thing that it is.
- jjgreen 6y ago"WSL" is Windows Subsystem for Linux is obviously from the old Services for Unix used to bait-and-switch people to NT, and the grammar in the latter is irrelevant, the meaning of "SFU" is clear.
- GEBBL 6y agoOtherwise known as DSL?
- kencausey 6y agoNote: if you edit the post before the time limit passes you can fix the casing of Dos.
- ulzeraj 6y agoMight want to look at mtools.
- panpanna 6y agoI guess someone had to ask this... Does it run under WSL?
- kentonv 6y agoWell, no... WSL runs Linux inside Windows. DSL runs Linux inside DOS. So there's no stacking that makes sense here. (I think we're seeing just how confusing the "Subsystem for Linux" naming is. "Foo Subsystem for Linux" sounds like a way to run Foo under Linux, but it's the opposite...)
- xen0 6y agoWindows -> Dosbox -> DSL -> Wine?
- kchr 6y agoWe have to go deeper.
- ansible 6y agoThere was a video where someone was running a firefox browser inside another browser using wasm. It was presented as a wacky "future history" talk... I can't find it in my watch history
- Fej 6y agoYou're thinking of this: https://www.destroyallsoftware.com/talks/the-birth-and-death-of-javascript https://www.destroyallsoftware.com/talks/the-birth-and-death... at about 13:10.
- cabalamat 6y ago> I think we're seeing just how confusing the "Subsystem for Linux" naming is. Indeed. > a way to run Foo under Linux "Under" is also confusing since "run X under Y" means the same as "run X on Y" even though it's the opposite analogy. I suggest everyone stick to "X on Y", e.g. Linux on DOS.
- phendrenad2 6y agoSo does this run DOS on Windows? Or DOS on Linux? Or Linux on DOS? Or DOS on Linux on Windows? Would be nice if there were an explanation in the README.
- benjojo12 6y agoThis runs Linux "inside" of DOS, allowing you to exec Linux i686 binaries "inside" of a DOS terminal I put inside in quotes because how this actually works is quite amusing (and apparently is actually how Windows 95 also works)
- kentonv 6y agoIs this explained somewhere? I'd love to read how it works (without trying to understand the source code).
- haileys 6y agoAuthor here. I am planning to do an in depth write up of how this works, but it seems Hacker News found it sooner :) When DSL is first invoked at the command line it boots up the Linux kernel which takes over control of the computer from DOS. Now here’s the trick: DSL makes use of a processor feature called VM8086 which allows for a 32 bit operating system to run legacy 16 bit code mostly natively. This feature is how early Windows, DOS extenders, etc worked. The Linux kernel also supports VM86, although it is largely undocumented and not really used these days. I think dosemu is the only major user of VM86 on Linux. DSL then returns to DOS, which has essentially been flipped inside out and is now unknowingly running inside a VM8086 task. Helpfully Linux does not appear to clobber DOS’s memory during its own boot process. DSL does just enough emulation of hardware like the keyboard to make things work, allowing DOS raw hardware access for everything else. This situation of running two operating systems at the same time on the same hardware is extremely fragile and unsafe of course, but it does seem to work surprisingly well anyway!
- kentonv 6y ago
- lm2s 6y agoTake that, Microsoft! :D
- smogcutter 6y ago“Your scientists were so preoccupied with whether or not they could, they never stopped to ask if they should.” -Dr. Ian Malcolm
- glitchc 6y agoDoes it support running 16-bit real mode DOS binaries a la DOSBox?
- irth 6y agoYou don't need it to run DOS binaries on DOS.
- glitchc 6y agoIt’s not clear if this is DOS or a DOS shell that actually executes Linux binaries. The description is confusing, hence my question.
- fl0wenol 6y agoIt is literally DOS, so it executes real mode binaries natively. Okay, actually, this is more like VMWare ESX in the 4.0 days. It's kind of, uh, inside out. Basically it's DOS, which launches Linux via DSL, which then runs a task out of init in vm86 mode that uses KVM to _continue_ the DOS that launched it as if it were the only thing running. The DOS doesn't know anything has happened, even though the rug has been pulled out from under it, and it is now running in a KVM VM guest. You just can't tell anything is different because all the BIOS/real mode stuff is unchanged. You get your prompt back when a native Linux binary finishes but it's the linux kernel emulating the DOS session after that first command, until you reboot.
- derekp7 6y agoIf I recall correctly, there was at one time a Linux boot loader that ran from DOS, which could make use of DOS device drivers. I recall using Yggdrasil Linux which had an option to boot this way, which used the DOS driver for my SCSI card and CDROM drive to make it available under Linux.
- bitwize 6y agoThat was LOADLIN. When coupled with a Linux filesystem called umsdos, it allowed you to boot Linux without repartitioning your disk or clobbering your MBR. Fun times. Umsdos overlaid a POSIX file system on top of an MS-DOS file system, using a scheme somewhat similar to Windows long filenames (but created before that became a feature of Windows). Basically, every directory would have a magic file called --LINUX-.--- that contained POSIX file data, including full filenames and permissions.
- axaxs 6y agoBrings back old memories. My first Linux experience was with PhatLinux and WinLinux2000. We only had one family computer and I didn't want to risk nuking the disk, which I now know would have inevitably happened.
- Narishma 6y agoI used to use that when I had a sound card that was not supported in Linux. I would load the drivers from DOS which provided Sound Blaster compatibility, then boot Linux from there.
- incanus77 6y agoStill is: http://distro.ibiblio.org/baslinux/ http://distro.ibiblio.org/baslinux/ I'm using it currently on a 386SX with 8MB of RAM (not to post this, however). Edit: Ah, this doesn't do the driver bit. But it works pretty well in itself.
- anthk 6y agoWell, if you were connected by ssh or even telnet to some pubnix, you could post there through lynx :D
- thotsBgone 6y agoAlso Dick Sucking Lips
- dang 6y agoHey, could you please stop posting unsubstantive comments to HN? It's not what this site is for, so we ban accounts that do it, and eventually the main account as well. https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html
- maple3142 6y agoJust wondering. Since "Windows subsystem for Linux" is running Linux on Windows, shouldn't it be named "Linux subsystem for DOS"?
- teawrecks 6y agoWindows naming is wrong :D
- Lammy 6y agoNT != DOS :)
- plus 6y agoNo, because this is running Linux on DOS.
- maple3142 6y agoThanks, I thought it is running DOS under Linux before I saw you comments.
- app4soft 6y ago> running DOS under Linux What about DOSBox?
- einpoklum 6y agoDOSBox would be the "Linux Subsystem for DOS" using this contorted naming scheme. Aren't we having fun now? :-)
- pwdisswordfish4 6y agoIt is, actually. It just happens to be the same DOS that was running before Linux was started.
- minxomat 6y agoEDIT: I stand corrected. A closer look at TFA confirmed that it is indeed DSL. I was confused by the screenshot which at first glance just shows DOS running in QEMU on Linux. But it goes deeper! Yes, that is correct. Windows Subsystem for Linux means it's one of Windows' subsystems which provides linux. This should be called Linux Subsystem for DOS.
- TheRealPomax 6y agoThis should come preinstalled on literally any and all Linux flavours. It would remove so many barriers for folks first trying Linux after decades of Windows.
- armoredkitten 6y agoI feel like for most Windows users, using DOS is probably as (or even more) foreign as using Linux. How many times do you think the average Windows user has used a command prompt in the past year?
- TheRealPomax 6y agoCounter question: how many times do you think the average Windows user has tried installing Linux? Because it's probably fewer than those who use what they'll invariable call the "dos box" for something, so having something in place to make the transition for those Windows users who DO venture out of their comfort zone to give Linux (yet another?) try easier is great.
- RealStickman_ 6y agoThis is Linux under DOS and not DOS under Linux.
- dguaraglia 6y agoThis used to be the best way to try Linux before live CDs became a thing. The first Linux distro I ever used (DragonLinux) was 'installed' by unzipping an 8mb zip file and running a BAT file. You could 'uninstall' it by deleting the directory it created next time you booted into DOS.
- UncleSlacky 6y agoSlackware had "ZipSlack" which would fit on a 100Mb Zip disk, or could be installed (read: copied) into a DOS directory and run from there: https://en.wikipedia.org/wiki/ZipSlack https://en.wikipedia.org/wiki/ZipSlack
- mikewarot 6y agoIf someone has Linux, wouldn't they just run FreeDOS in a VM?
- Zardoz84 6y agoThis remember the days when I started SuSE Linux 5.1 with loadlin
- CivBase 6y agoCould you theoretically get forwards compatibility with the NT kernel by running Wine in this?
- annoyingnoob 6y ago640K is enough memory for anybody, right?
- Noxmiles 6y agoIf you take the abbreviation style from Microsoft... Windows Subsystem for Linux -> WSL Linux Subsystem for DOS -> LSD I like it!
- basementcat 6y agoGreat news! When people complain about my code I can just say I wrote it on LSD.
- merlinscholz 6y agoExcept that it's the DOS Sybsystem for Linux, not the other way around
- thrownaway954 6y agoi saw a youtube video the other day entitled "why learn asm in 2020", i guess for doing something like this. this project looks really cool. i don't hear a whole lot of people using dos nowadays but for a tinkering around that would be awesome. hats off to the author. it's amazing one dude could code this.
- necovek 6y agoIn a way, DOS was a perfect platform to learn tinkering with. .COM files were basically pure machine code, and DOS would execute them directly.
- shmerl 6y ago> DOS Subsystem for Linux > A WSL alternative for users who prefer an MS-DOS environment. Very confusing description. Is it made for Linux? So what does it have to do with WSL which is made for Windows? May be it's a Wine analog for running DOS programs on Linux then or it's actually emulating things like DosBox does?
- sigzero 6y agoDOS Subsystem for Linux means exactly that, you are using a DOS subsystem in Linux. That is why it is confusing. If it is a WSL for DOS, that is what it should be called.
- YetAnotherNick 6y ago> should be called WSL for DOS Windows subsystem for linux for DOS. Sounds right
- chris_wot 6y agoDear god I am so confused what this does now.
- netsharc 6y agoIt seems like cropping the QEMU "chrome" from the screenshot would make it clearer that it's a DOS environment, and that the prefix "dsl" allows you to run Linux commands...
- anonymousisme 6y agoI love this! It exemplifies the absurdity of making Linux a subsystem of Windows (a far less powerful OS) by doing the same thing with DOS!
- oso2k 6y agoA couple comments....this is super interesting to me. It boots into Linux from an HDD image. It also requires and uses Unreal Memory Mode [0][1] (vs. Real Mode or Protected Mode). It makes me wonder how compatible & stable this is with other DOS era software. [0] https://en.m.wikipedia.org/wiki/Unreal_mode https://en.m.wikipedia.org/wiki/Unreal_mode [1] https://github.com/charliesome/doslinux/blob/master/doslinux.asm#L239-L247 https://github.com/charliesome/doslinux/blob/master/doslinux...
- anthk 6y agoIt could be useful for DOS users who want to run Nethack 3.6.6 under Linux. Altough running Nethack under Minix 2 would be easier.
- fsiefken 6y agoSo I would love to know if I could run Win98SE/ME and SSH into the native running Linux with this. Perhaps I'd actually prefer that over running Windows10 with WSL2. One problem would be modern browser support for Win98SE so I would need to use an Windows X client to start the linux based browser. Come to think of it, perhaps you could run Wine to run dos, filemanager/explorer and control panel to emulate the Windows98SE experience.
- tbodt 6y agoSince it's not entirely clear: this works by loading a Linux kernel into unused memory, saving the current state of DOS, turning over control of the computer to Linux, then having the init process start a new that uses the vm86 system call to resume execution of DOS.
- userbinator 6y agoThat is actually not far from how the kernel of the Win9x series (and also Win3.x on a 386) is structured --- a "hypervisor"-like kernel runs DOS and Win32 applications in "virtual machines" using the V86 mode of the processor. In Win386/9x, that kernel is known as VMM32. In this case, it's the Linux kernel. It's very interesting to see these "chimeric" OSs appear.
- quietbritishjim 6y agoHere's a bit more detail from The Old New Thing blog about Windows 3.11: https://devblogs.microsoft.com/oldnewthing/20100517-00/?p=14013 https://devblogs.microsoft.com/oldnewthing/20100517-00/?p=14... It includes: > As you might suspect from its name, the virtual machine manager created virtual machines. Inside the first virtual machine ran a copy of Standard mode Windows. ... The other virtual machines each ran a copy of MS-DOS and were responsible for your MS-DOS sessions. ... It’s kind of stunning to realize that Enhanced mode Windows was really a completely new operating system with multiple virtual machines, pre-emptively multi-tasked with virtual memory. I think it's quite interesting that, on that version of Windows, all the Windows programs were only cooperatively multitasked while all the DOS programs were pre-emptively multitasked.
- quietbritishjim 6y agoBy the way, I get the impression that Windows 95 onwards worked a bit differently, with Windows itself more tightly integrated in managing virtual machines rather than running in one itself (more like a type 2 hypervisor). For example, this post seems to suggest that: https://devblogs.microsoft.com/oldnewthing/20071224-00/?p=24063 https://devblogs.microsoft.com/oldnewthing/20071224-00/?p=24...
- simonblack 6y agoApart from the naming issue, wouldn't "DOSBOX on Linux" be more useful?
- RicardoLuis0 6y agoThis isn't "DOS on Linux" but rather "Linux on DOS" (Hence the name, DOS Subsystem for Linux, mirroring Windows Subsystem for Linux), so I don't think it has much to do with dosbox.
- gamedna 6y agoSerious question, simply put: why? Was this done for academic reasons, or is there an application for this technology in mind?
- shirro 6y agoMany years ago we used to run loadlin under dos to load linux and dosemu under linux to run dos. And by many I mean before Windows 95. And ofcourse if you wanted the worst of both worlds there was cygwin.
- baumatron 6y agoFor those unfamiliar, confused, or otherwise opposed to the naming of the Windows Subsystem for Linux, I would highly suggest reading chapter 2 of Windows Internals: Seventh Edition, which describes how Windows supported POSIX and OS/2 through its "subsystem" model, and how WSL fits into that model and what additional changes were required. The naming of "Windows Subsystem for Linux" makes perfect sense in this Windows OS centric context.
- lproven 6y agoSo this is basically the equivalent of a non-dedicated Netware 2.x server, then? Netware 2 was an 80286 OS. (DOS was an 8086 OS.) https://en.wikipedia.org/wiki/NetWare#NetWare_286_2.x https://en.wikipedia.org/wiki/NetWare#NetWare_286_2.x Normally, Netware took over the whole PC, but if you ran it non-dedicated, it loaded in memory above 1MB (which DOS couldn't use anyway) and then let DOS continue running in a pre-empted box, using the screen and keyboard. So someone could use the console as a DOS PC, while the Netware server ran in the background using the rest of the server's RAM, doing file and print for all the client machines. It worked really well... the main problem was that the user would often turn off the "PC" when they were done. >_< More seriously -- this seems to compare well to the old Locus DOS/Merge product: https://en.wikipedia.org/wiki/Merge_(software) https://en.wikipedia.org/wiki/Merge_(software) Is there any benefit to DSL [argh, TLA overload, this is not Damn Small Linux] compared to DOSemu?