8 ms·
Run Linux Programs on DOS
- queuebert 3y agoI've always thought the phrase "Windows/DOS Subsystem for Linux" was backwards. Shouldn't it be "Linux Subsystem for Windows/DOS"? What am I missing?
- nubinetwork 3y agoIt's always been backwards, including its predecessor, Windows Services for UNIX.
- miah_ 3y agoWhen they released a product for UNIX servers they didn't even mention Windows. "Advanced File and Print Services for UNIX". If you wanted to run a WindowsNT Domain on a UNIX (SCO) server while ignoring SAMBA you forked out tons of cash (per seat) to license this software.
- efdee 3y agoIt's a subsystem of Windows, so a Windows subsystem. It's for running Linux. Hence, Windows Subsystem for Linux.
- phloximaxi 3y agoIs it really a windows subsystem "for linux" or a windows subsystem "for running linux". There is a big difference. Very bad naming.
- rkeene2 3y agoWSL originally didn't run Linux, it performed system call mapping
- ElectricalUnion 3y ago"Yes" It does both syscalls in linux style "for linux" programs (WSL1) and it also happens to be "for running linux" (WSL2).
- midoridensha 3y agoMicrosoft has always been terrible at naming; it seems to be part of their DNA. The only time their products have good names is when they buy those products from someone else and keep the name (e.g., Powerpoint).
- Dalewyn 3y agoClipchamp is a terrible name.
- marcodiego 3y agoSo... "office for windows" refers to the windows you have on your office?
- efdee 3y agoNo, just like Windows Subsystem for Linux doesn't refer to the Linux I have on my Windows Subsystem (whatever that would mean). I don't get the confusion, to be honest. Do you also feel that "Windows driver for HP Deskjet" is a way to run Windows on your HP Deskjet?
- kevingadd 3y agoIf following the WSL naming convention, it would be something like 'Windows Software for Offices'
- bayandin 3y agoYep, it definitely should be named LSD
- jaclaz 3y agoIt's coming from the same people that call "boot" the volume where the operating system resides and "system" the volume that is booted: http://www.multibooters.co.uk/system.html http://www.multibooters.co.uk/system.html And that of course puts 32 bits executables in SysWoW64 and 64 bit executables in System32.
- squarefoot 3y agoNot to mention the backslash.
- Dalewyn 3y agoIt kind of makes sense if you give it some thought, though. The system boots from the "system" partition, and then the system boots the operating system in the "boot" partition. system32 holding 64-bit binaries in 64-bit Windows is 300% backwards compatibility to accomodate legacy hard-code, though.
- jaclaz 3y agoYes and no. Compare: >The system boots from the "system" partition, and then the system boots the operating system in the "boot" partition. With: The operating system boots from the "boot" partition, and then it is loaded from the "system" partition. Or: The boot files are in the "boot" volume, the operating system files are on the "system" volume. In any case, you shouldn't put a folder containing the BCD (Boot Configuration Data) in a \boot folder and the BOOTMGR on a volume that you call "system" or you don't call the "other" volume "boot". About SysWow64/System32 sure it has been done for compatibility reasons but while System32 had to be kept, the name of the "new" folder could have been better chosen, like (say) Old32Sys, or Legacy32, or similar. Of course both represent not a problem, the naming is not intuitive and allows for a quick laugh, that's all.
- Dalewyn 3y ago>The operating system boots from the "boot" partition That's why the "Boot" tag moves to whichever partition is host to the running OS. The "system", as in the boot loader, is not the OS, is separate from the OS, and initializes before the OS. >About SysWow64/System32 sure it has been done for compatibility reasons but while System32 had to be kept, the name of the "new" folder could have been better chosen, like (say) Old32Sys, or Legacy32, or similar. The name stems from the Windows on Windows[1] subsystem, or WoW for short, which serves to execute 16-bit executables on 32-bit Windows NT. The most famous component of this subsystem is NTVDM[2]. Windows 32-bit on Windows 64-bit[3], or WoW64 for short, is the 32-bit practical equivalent to WoW for 64-bit Windows NT. Whereas WoW relied heavily on virtualization and emulation, WoW64 instead presents a 32-bit system library that 32-bit programs are silently redirected to. As an aside, C:\Windows\System is still around for backwards compatibility even in 64-bit Windows. It houses 16-bit binaries.[4] [1]: https://en.wikipedia.org/wiki/Windows_on_Windows https://en.wikipedia.org/wiki/Windows_on_Windows [2]: https://en.wikipedia.org/wiki/Virtual_DOS_machine#Windows_NTVDM https://en.wikipedia.org/wiki/Virtual_DOS_machine#Windows_NT... [3]: https://en.wikipedia.org/wiki/WoW64 https://en.wikipedia.org/wiki/WoW64 [4]: https://en.wikipedia.org/wiki/Special_folder#List_of_special_folders https://en.wikipedia.org/wiki/Special_folder#List_of_special...
- mdp2021 3y ago> What am I missing? The "ownership" :) ("MyBrand (TM) Solution for Opportunity")
- _y5hn 3y agoEEE
- cout 3y agoIt seems backward to me, too. Try reading it as "DOS subsystem for [running] Linux".
- HeckFeck 3y agoThe marketing department
- omoikane 3y agoI guess it should be parsed as "Windows/DOS: (Subsystem for Linux)" as opposed to "(Windows/DOS Subsystem) for Linux".
- tadfisher 3y agoIIRC, the original "Windows Subsystem for UNIX" was named such to avoid trademark issues with the more sensical "UNIX Subsystem for Windows".
- Karellen 3y agoI did once see someone who claimed to have knowledge of Windows internals say that "Windows subsystem for X" was a general naming convention for Windows subsystems, e.g. the code that implemented the audio architecture might have been called "Windows subsystem for sound", or similar. And therefore "Windows subsystem for Linux" was the natural extension of this policy for the code that implemented the Linux compatibility architecture. However, I've had a bit of a web search on a few occasions since then, and not been able to find any concrete evidence to support the existence of any other "Windows subsystem for X" subsystems. So that might have just been a random idiot making stuff up, as far as I can tell. Someone with better searchengine-fu might be able to find something more conclusive though?
- lukeh 3y agoThink it’s a trademark issue, order matters.
- Dalewyn 3y ago>and not been able to find any concrete evidence to support the existence of any other "Windows subsystem for X" subsystems. They were originally known as Microsoft Subsystems[1][2] and encompassed Win32, POSIX, and OS/2. This was followed by Windows Services for UNIX along with the demise of POSIX and OS/2 subsystems, which was subsequently succeeded by Windows Subsystem for Linux. Yes, this means Win32 is to this day a subsystem of Windows NT. [1]: https://en.wikipedia.org/wiki/File:Windows_2000_architecture.svg https://en.wikipedia.org/wiki/File:Windows_2000_architecture... [2]: https://en.wikipedia.org/wiki/Microsoft_POSIX_subsystem https://en.wikipedia.org/wiki/Microsoft_POSIX_subsystem
- fsckboy 3y agotangential, but I always wished that somebody with more time and knowledge than me would have created a slim bootable linux hypervisor that could then boot Windows, in which you could then run a linux that "knew about/shared memory with" the hypervisor. Think of the goal as being, I can reboot the linux or I can reboot the Windows (or other OSes) without rebooting everything. I would have liked it better if VMware worked that way, or virtualbox now.
- jrm4 3y agoI'm inclined to believe something as simple as "the suits say you can't have Linux be the first thing," especially since no one can seem to come up with a better explanation.
- airstrike 3y ago> A WSL alternative for users who prefer an MS-DOS environment. Hilarious
- philonoist 3y agoThat is what I thought. Haha! Also, wasn't it back in the day people did the fastest initial ritual of using DOS for installing a whole big Win/*nix OS much like internet explorer for Chrome? Hilarious imagining DOS being the host for Linux programs.
- UncleSlacky 3y agoIt reminds me of ZipSlack: https://en.wikipedia.org/wiki/ZipSlack https://en.wikipedia.org/wiki/ZipSlack
- rkeene2 3y agoThere also used to be a project called LINE, which is to Windows what WINE is to Linux -- in other words it let you run Linux binaries on Windows
- elvis70 3y agoPrevious thread (102 comments): https://news.ycombinator.com/item?id=28572681 https://news.ycombinator.com/item?id=28572681 It seems to be using the VM86 mode of the 386 (https://en.wikipedia.org/wiki/Virtual_8086_mode https://en.wikipedia.org/wiki/Virtual_8086_mode). So it won't work if you are using EMM386 by example.
- shmerl 3y ago> DOS Subsystem for Linux This naming scheme which originated from Windows is atrocious. If anything, it should be Linux subsystem for DOS, not the other way around.
- natas 3y agoThis is really neat, would it work on ArcaOS or OS/2? Are there some limitations on the linux binaries, i.e. addressable space, etc. or pretty much anything that can be compiled with musl would likely work?
- jmmv 3y agoThis is really cool, and there doesn't seem to be a lot of code in the repo. But before trying to read it… does anyone know how this works? Edit to answer myself: found the answer in this comment from the last time this was discussed: https://news.ycombinator.com/item?id=28574202 https://news.ycombinator.com/item?id=28574202
- elvis70 3y agoIt uses the Virtual 8086 Mode of the 386. The Intel 80386 Reference Programmer's Manual explains that well [1], I think. So, in this case, the first mega of RAM, containing MS-DOS and the BIOS is virtualized in a VM86 box while the CPU is running in protected mode, permitting the host OS to cohabit with a protected-mode OS. It is in fact, a VM86 monitor. Another example of such a program is EMM386 or similar like Jemm386 whose source code is available [2]. [1] https://pdos.csail.mit.edu/6.828/2018/readings/i386/c15.htm https://pdos.csail.mit.edu/6.828/2018/readings/i386/c15.htm [2] https://github.com/Baron-von-Riedesel/Jemm https://github.com/Baron-von-Riedesel/Jemm edit: the link [1] was wrong
- johnea 3y agoJust more evidense that M$ brain damaged the entire generation raised on computers... C:? case insensitive file system? Why would anyone who can run linux run this shit?
- 64operator 3y agoMS-DOS is still widely used in embedded, MS still sells it to OEMs. There is also the Free and Open Freedos. Maybe you have a small program you developed on Linux and maintain on several OS's, and you don't want to go through the nightmare of maintaining a DOS port as well.
- yjftsjthsd-h 3y agoI'm pretty sure it's a joke or "because we can" project, not something someone would seriously use
- Dalewyn 3y ago/dev/sda? Case sensitive file system? Why would anyone who can run DOS run Linux? On a more constructive note, MS-DOS and Windows operate on a fundamentally different philosophy from UNIX. That doesn't make them inherently bad. The vast majority of users even relate better (FSVO better) to the way Windows does it.
- indymike 3y ago> On a more constructive note, MS-DOS and Windows operate on a fundamentally different philosophy from UNIX Not sure I follow. There are many concepts in DOS that are the same as Unix: pipes, redirecting output, stdout, stdin, and stderr. DOS's batch language was limited, but conceptually it allowed for very Unix like chaining of commands. I suppose you could argue / vs - for command line paramaters... but conceptually they were similar. Unix file systems could be case sensitive or not. I think about the only thing that philosophically was all that different was drive letters, multitasking and multiuser. Unix didn't do drive letters, and DOS didn't do multitasking and multiuser. Eventually Windows did, and grew up to compete nicely with Unix.
- BirAdam 3y ago
- em-bee 3y agofor some reason this title reminded me of my first "encounter" with UNIX. i believe it was the first issue of the german computer magazine IX. it praised the benefits of UNIX over other systems and somehow that got me hooked. i didn't have access to a UNIX system but i was searching for it. next i got a book from O'Reilly called "Dos meets UNIX". my first O'Reilly book. it sounded like what i needed, since DOS is what i had, and UNIX is what i wanted. i don't remember what i did with that, but i believe the book pointed to some utilities that emulated UNIX commands in a DOS environment. i finally got access to a real UNIX system at university (SUN and AIX) and then soon came Linux, which i installed dualboot, and with every upgrade/reinstall the DOS partition shrank and the Linux partition grew, and the rest is history.
- rnd0 3y agoNow that's some Damn Small Linux!
- throwbadubadu 3y ago> for users who prefer an MS-DOS environment. These people really exist? I cringe everytime I even have to run few commands on Windows when I cannot use gitbash or the likes cause of things.. the ergonomics, the ugly tools, and then (haha works both ways) the totally unreasonable names. I thought even Windows power users were convinced that dos environment is sad and that is how we got Powershell? Please dos environment lovers speak up and defend it! (:
- segasaturn 3y agoPersonally I'm fond of MS-DOS because of all the ugly, arbitrary hackiness of it all. It's a beautiful mess. It's also an incredibly lean and responsive OS compared to a modern day OS where every keystroke and mouse movement goes through a dozen layers of abstraction. DOS gives you close to direct access to hardware.