13 ms·
Testing the Windows Subsystem for Linux
- radarsat1 9y agoI like the idea of the Linux Test Project. Neat. I'm curious, does the WSL actually use any parts of Linux under the hood, or is it just an emulation of the user space, like Cygwin?
- abrowne 9y agoIt uses a Linux-compatible kernel interface with no Linux kernel code plus Ubuntu's userland. I guess that's why they sometimes call it Bash on Windows. I'm surprised no one's proposed "Windows Subsystem for GNU".
- azinman2 9y agoBecause the main bit is translating Linux syscalls to windows. Which isn't gnu.
- cryptarch 9y agoIsn't the main use of WSL "first-class GNU tools for Windows"? I can't really imagine people running anything other than development tools on WSL, and most of those come from the GNU project.
- deleted 9y ago[deleted]
- bitwize 9y agoNope. It traps the software interrupt which initiates a system call under Linux and the Windows kernel takes over, emulating that system call.
- ape4 9y agoI still have a hard time with bash-backwards name: "Windows Subsystem for Linux". Its a Linux subsystem for Windows.
- dragonwriter 9y agoIt's a subsystem of Windows (hence Windows Subsystem). And, among all Windows Subsystems, it's the one for Linux, hence Windows Subsystem for Linux.
- yarrel 9y agoYes that still doesn't work.
- TillE 9y agoBut that (a subsystem "for Linux") would only be referring to the small compatibility layer for syscalls and stuff, rather than the whole Bash environment which "WSL" typically means.
- GhotiFish 9y agoWindows Subsystem's Not Unix.
- greglindahl 9y ago... which might fit well with IBM's not quite Unix thing AIX, which acquired the nickname "Ain't unIX".
- EpicEng 9y agoYeah it's the 'for' in there that makes it wrong. It's not 'for' Linux, it's for Windows. I know what it is and I _still_ think of it backwards every time I read it.
- yakk0 9y agoit's the subsystem for running Linux. It's not actually Linux, and after enabling the subsystem you still have to actually get the Ubutntu image. That image is the Linux part.
- Analemma_ 9y agoUsing the unit tests of other Linux software to be your own compatibility test is delightful. It almost feels a little subversive.
- rl3 9y ago>In these cases, the WSL team covers test gaps by writing our own unit tests. At time of writing the team has written over 150,000 lines of unit test code for systems calls and virtual files (/proc, /sys). I wonder why they went that route instead of contributing to LTP directly? While there's probably some edge cases specific to WSL, surely much of their increased unit test coverage would be applicable beyond WSL.
- jackhammons 9y agoWe maintain a fork of LTP internally. Eventually we hope to contribute our changes back but unfortunately open sourcing isn't free and we have bigger fish to fry[1]. [1] https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo https://wpdev.uservoice.com/forums/266908-command-prompt-con...
- rl3 9y agoThat's understandable. Thanks for the reply. Out of curiosity, is progress on WSL bound by any blocking issues in particular, or could your team benefit from more resources being assigned to the project? Maybe I'm naïve, but I tend to view WSL as a perfect way to win over a ton of developers who are becoming disillusioned with macOS, but are hesitant to run bare metal Linux due to the headaches involved (insofar that macOS and Windows "just work").
- deleted 9y ago[deleted]
- seiferteric 9y agoWake me when MS offers Linux subsystem for Windows (basically commercial WINE). From what I have read, MS is not actually that interested in improving the Windows kernel anymore unless needed or profitable. Why don't they give up and run windows user space on Linux (or BSD) :)
- meddlepal 9y agoWhy would they do that? NT is a very good kernel design.
- JdeBP 9y agoAnd, moreover, the ability to run multiple operating system "personalities" on top of it like this was part of that design pretty much from the start.
- Vogtinator 9y agoLinux had that as well until it was castrated a while ago. It was called "exec_domains".
- deleted 9y ago[deleted]
- cmrdporcupine 9y agoThat's exactly backwards. They're doing a reasonable but very late job of modernizing their user space on top of their quite decent kernel, including giving a Linux environment for those that want it. I for one respect them for that, even though I've been almost exclusively a Linux user since the early 90s. Lately installed Windows 10 and TBH between powershell and improved command line facilities, improvements to the windows GUI itself, and the linux subsystem it's not bad at all these days.
- runjake 9y agoYou've "read" wrong. The NT kernel has seen major changes up through and including W10, including focusing on power management and efficiency, improving modularity, and memory use. It seems like your comment was meant to troll, but in the odd chance you're interested, you can follow a lot of these changes and the decisions behind them where Microsoft documented the process on the old Engineering Windows blog, and well as more recently at the main Windows blog itself.
- 2muchcoffeeman 9y agoDoes anyone use this for work? Could I replace Ubuntu with Windows now?
- samdk 9y agoI use it on my laptop and am generally very happy with it, although I don't do all that much technical work there and certainly wouldn't want it to replace my primary workstation. (I'd be dearly sad if I had to give up xmonad.) But it's made my laptop a far more pleasant place to get work done if I need to do so, and generally works far better than I was expecting it would. I no longer feel compelled to run a VM on my laptop to get real work done.
- SwellJoe 9y agoI used it for a while, when Fedora 24 refused to work reliably on my 4k laptop (it worked under 23, and now works again under 25). It was OK. I mean, it's an amazing feat of engineering, but there's a ton of little (and not so little) quirks that made it painful. Sharing files across the two systems was (maybe still is?) disastrous. I've heard of total Linux system corruption, but I personally had files disappear (they were checked into a remote git repo, so no loss, except for recent changes). It's covered in the docs, but I didn't grok what they were saying and the real gravity of it. Since I was using Windows native Atom for my editor, this was cumbersome. But, most things work about how you'd expect them to. I was able to install the software I work on (which runs as root, and pokes at everything on the system), and it worked as I expected it to. I didn't even have to tweak it. I'm still more comfortable and productive in Linux, so I'm happy to have my Linux partition running well again. I also prefer Fedora to Ubuntu, so that's a win for running Linux natively. But, if I liked developing in, say, Visual Studio, and was deploying my software to Linux servers or working on cross-platform desktop apps, having the local Linux would be a big win. Even with the forced separation of filesystems, it's still more transparent than a Vagrant managed VirtualBox, or something. Also worth noting: Windows is remarkably better as a development environment than the last time I had to develop on a Windows machine (about 10 years ago, one of my jobs included building cross-platform software packages). The quality of tools available is very high. There are good terminals, all of the languages I use have good installers available. Even if Linux weren't there, it's much less painful to develop on Windows than it used to be. (Still painful, and I still had a huge variety of headaches, mostly due to absolutely shitty package management on Windows.)
- Zyst 9y agoIs anyone here using this for *Nix traditional tools? Mostly curious about Vim/Tmux, and having serve operations spit out the server into the actual Windows browser? I did read something about the creator update adding 24 color support.
- repsilat 9y agoI use vim in it when I code on my home computer, haven't had any problems. I haven't tried tmux, but I think that'd be fine too. I'm less sure about things that require a GUI, and last time I tried postgres it didn't work. That was a while ago, though, and they might have made progress since. TFA says the postgres tests are passing.
- quanticle 9y agoThings that require a GUI require you to have a separate X server running. WSL, as far as I know, does not support running X11. However, if you do have a Windows native X11 server running (like xming, for example) things like emacs and gvim seem to work. I haven't tried anything more intensive than those, though.
- 112233 9y agoyoutube in firefox played ok.
- daenney 9y ago> Things that require a GUI require you to have a separate X server running. WSL, as far as I know, does not support running X11. They mention X/GUI support in the "What's new in Bash/WSL" article[1]. > Note: Some of you may also have been following along with some intrepid explorations into running X/GUI apps and desktops on WSL. While we don’t explicitly support X/GUI apps/desktops on WSL, we don’t do anything to block/prevent them from running. So if you manage to get your favorite editor, desktop, browser, etc. running, GREAT but know that we are still focusing all our efforts on delivering a really solid command-line experience, running all the command-line developer tools you need. [1]: https://blogs.msdn.microsoft.com/commandline/2017/04/11/windows-10-creators-update-whats-new-in-bashwsl-windows-console/ https://blogs.msdn.microsoft.com/commandline/2017/04/11/wind...
- codebook 9y agoI gave up WSL after experiencing significant performance drop on GHC, Stackage. It was less than 1/10th of native for compiling Haskell code.
- ulber 9y agoHere's the issue on GitHub if you'd like to track it: https://github.com/Microsoft/BashOnWindows/issues/1671 https://github.com/Microsoft/BashOnWindows/issues/1671 benhills describes the cause: For some context, I've looked at what causes this slowdown. For some reason stack has mapped an mind-bogglingly huge region of memory (I'm talking dozens of terabytes). When we fork we walk the entire address range to set up the new process's state. We have a design that should vastly speed this up, but we're approaching "pencils down" date for Creators Update.
- hornetblack 9y agoFor some context: amd64 has 256TiB of address space. So 1 dozen is half a percent of what seems like a mind boggling amount of address space.
- codebook 9y agoThanks for the info!. I will try again.
- deleted 9y ago[deleted]
- pixelbeat__ 9y agoThe GNU coreutils test suite would be interesting to run as it tests most syscalls in various edge cases. Some details at http://www.pixelbeat.org/docs/coreutils-testing.html http://www.pixelbeat.org/docs/coreutils-testing.html
- partycoder 9y agoAs a Linux user, MS Windows Subsystem for Linux is as interesting as Microsoft Bob. Microsoft cannot say it loves Linux until they launch their flagship products such as MS Office and MS Visual Studio on Linux. Until then, it's all fugazzi. MS SQL Server on Linux was good progress.
- Clownshoesms 9y agoIs there telemetry built into this too? I'd worry about ssh logins being logged for diagnostic and privacy journey purposes.
- LinuxFreedom 9y agoYou will see ads on your command prompt from time to time and the bash completion will contain "sensible recommendations" based on your general behavior, psychological state and political orientation. Now that everything was published they also plan to pre-install the diverse arsenal of hacking tools on every machine, as there is no reason now anymore to hide that stuff - what will make the fight for freedom much easier for everyone involved! To support your patriotism there will now be a personal statement of all past MS CEOs showing up on startup and the national anthem playing to support your emotions. Also from time to time a screensaver will show the sentence "Everybody adores you, because you belong to a global hacker elite using the Windows operating system in 2017! Ignore that laughter around you!"
- UweSchmidt 9y agoLast part of your post is a bit wild, but you got me at the start.
- cryptarch 9y agoI'd just like to interject for moment. What you're refering to as WSL, is in fact, GNU/NT, or as I've recently taken to calling it, GNU plus NT. NT is not an operating system unto itself, but rather a non-free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX. Many computer users run a modified version of the GNU system every day, without realizing it. Through a peculiar turn of events, a version of GNU which is widely used today is often called WSL, and many of its users are not aware that it is basically the GNU system, developed by the GNU Project. There really is an NT, and these people are using it, but it is just a part of the system they use. NT is the kernel: the program in the system that allocates the machine's resources to the other programs that you run. The kernel is an essential part of an operating system, but useless by itself; it can only function in the context of a complete operating system. WSL is normally used in combination with the GNU operating system: the whole system is basically GNU with NT added, or GNU/NT. Windows 10, the so-called NT distribution, is really a distribution of GNU/NT! (Sorry for the copypasta, I couldn't resist.)
- kelnos 9y agoThe interesting bit of WSL (what the article talks about) is a Linux syscall translation/emulation layer, as well as ELF64 binary support (not specific to Linux, but not specific to GNU either). You can certainly install the Linux versions/ports of GNU tools and run them under WSL, and that's what the stock setup looks like, but an important component of WSL is about emulating a Linux (the kernel) environment. If MS had actually ported the GNU base system to NT, then you could reasonably call it GNU/NT. They have not done that.
- cryptarch 9y agoI think it is more significant from a user's perspective that they get the GNU tools to run on their NT machine with MS support. What's the use of Linux syscall -> NT syscall translation if not compatibility with developer tools, most of which are GNU software?
- 9y ago
- nrki 9y agoRecently tried to use WSL to do some pair-coding tests in an interview, with screen & tmux. The damned terminal kept making characters disappear! I actually thought my interviewer was inadvertently deleting characters, or maybe trolling me. I had to switch to using an actual Linux system. MS have a ways to go before getting this right. I daresay I'll be on OSX by the time that happens though.
- adolfojp 9y agoDid you try using WSL with the creator's update? The fixes were extensive.
- deadbunny 9y agoYou mean the update that hasn't even finished rolling out globally?
- Omnius 9y agohttps://www.microsoft.com/en-us/software-download/windows10 https://www.microsoft.com/en-us/software-download/windows10 Click update now. This tool will let you install it without waiting inline (assuming you don't have the option from the built in windows 10 update tool) https://www.cnet.com/how-to/windows-10-creators-update-download-install/ https://www.cnet.com/how-to/windows-10-creators-update-downl... (Warning annoying video plays with sound)
- adventist 9y agoYeah they fixed that. It was very annoying.
- youdontknowtho 9y agoI think that the "pico process" + kernel driver model that they are using could be leveraged to build a new operating system on the windows kernel. That would give you a base for a new OS that can reuse the Windows Device Driver infrastructure.
- skynode 9y agoCan we get the new, improved subsystem without having to go through the Win10 Creator's Update?
- miguelrochefort 9y agoWhy not go through Windows 10 Creator's Update?
- skynode 9y agoApart from the new .NET Framework 4.7 and a few minor others, a bunch of features (e.g. Paint 3D) are not necessarily targeted towards advanced users. It would make sense to fragment some key modules we use as devs and make those available piecemeal without bundling features we'll probably never use with great features like WSL and the new Windows console. Essentially MS could give options just like it gives options about what to install on VS 2017 (for advanced users of course, regular users can have the default CU install mode).
- synle 9y agoAlthough I love their work, unfortunately the terminal (window cmd bash) is horrible. Copy and Paste is a pain, doing panel splits are impossible unless you use tools like tmux. I would love to see terminator or a more advanced terminal.
- gillette 9y agoI've been using ConEmu set up to auto launch Bash. Working pretty well apart from MS's ass-backwards resolv.conf population which overrides every Ubuntu mechanism for creating the file... so I have to run a script to get my VPN's DNS to work :)