News for hackers. Stuff that matters.
Re:Windows Subsystem for Linux is out of beta by tyrw on Friday July 28, 2017 @07:45PM (#14878499)
In my experience, emulators are never quite the same as the real deal. Has anyone used this, and if so how was it?
Re:Windows Subsystem for Linux is out of beta by alexanderdmitri on Friday July 28, 2017 @08:05PM (#14878608)
With the Creators Update there was major improvement. Here's how I'd put it:

I used to bring a picture of home with me on business trips, now the house just comes along more or less (there are the occasional plumbing issues on the road and it's jarring sometimes when I go outside and realize I'm in some weird neighborhood with maple syrup coating the sidewalks and immediately I'm getting hustled by some guy with his arm around my shoulders and people aren't walking anywhere, just standing there looking at me without blinking and even with the hustler spinning his yarn there's this eerie, heavy silence like a summer storm always on the horizon and I start to miss the fresh clean mountain air back home all the while trying to disengage myself from the hustler without starting too much of a conflict but when I step away my right shoe stays stuck on the sticky street and I stumble over and the hustler, before I've even hit the ground, he's already got his fingers around the wallet in my back pocket and still everyone just stands there watching as I smack pavement ... you know?).

Re:Windows Subsystem for Linux is out of beta by therein on Friday July 28, 2017 @07:47PM (#14878506)
It is not an emulator and the experience is pretty great for anything involving Linux as a workstation.

Even though they say "NO current plans to support X/GUI apps, desktops, servers, etc. at this time", this is achievable by installing VcXsrv.

Re:Windows Subsystem for Linux is out of beta by lottin on Friday July 28, 2017 @08:10PM (#14878626)
A Linux workstation at the very least involves X and full user's control over the computer, neither of which are provided by this piece of software.
Re:Windows Subsystem for Linux is out of beta by wfunction on Saturday July 29, 2017 @01:48AM (#14879734)
> A Linux workstation at the very least involves X

That's kind of a strange comment given that in these very same comment boxes the most ardent *nix users tend to bash the entire concept of GUI (no pun intended) and just assert that a command-line interface is the right way to use a computer.

Re:Windows Subsystem for Linux is out of beta by tyrw on Friday July 28, 2017 @07:50PM (#14878522)
Perhaps emulator was a poor descriptor in this case -- I haven't used it. But it is running a subset of functionality non-natively, correct?
Re:Windows Subsystem for Linux is out of beta by wvenable on Friday July 28, 2017 @08:02PM (#14878593)
It's a pretty interesting design -- Microsoft created a new class of processes called pico processes; these are native processes run without the normal Win32 overhead and are managed by a special pico process driver. For WSL, the driver implements the Linux kernel API and process loading. Linux API calls are mapped to existing Windows APIs or implemented directly in the driver.

Everything else in the WSL is the regular Ubuntu user land. So all the processes are "native" and they make calls to a kernel that acts just like Linux.

Re:Windows Subsystem for Linux is out of beta by xenadu02 on Friday July 28, 2017 @08:24PM (#14878689)
This is possible because Dave Cutler and the rest of his VMS team built Windows NT to support multiple personalities. From day one the Win32 subsystem was just one of several. That idea got sidelined when Windows became so popular but the core has always been there.

It's kinda funny: the Windows NT kernel (and Executive, the actual native API) are a single-root object hierarchy where everything gets mounted - much like unix - only even moreso. Mutexes, Registry Keys, etc are all objects mounted in the root filesystem.

I guess everything old is new again. Microsoft used to have a server product called Services for Unix that replaced the built-in POSIX 1.0 subsystem with a legit Unix environment but it was always a neglected product that only existed to get people to port server apps to Windows. This time they're doing the integration on end-user desktops and have spent more time getting Win API integration working smoothly.

Re:Windows Subsystem for Linux is out of beta by wvenable on Friday July 28, 2017 @09:12PM (#14878927)
> This is possible because Dave Cutler and the rest of his VMS team built Windows NT to support multiple personalities.

Although it would seem logical, the WSL doesn't actually use this system. The whole pico process engine and how it interacts with Windows is all new and not related to that design. I'm not really sure the reasoning behind it; perhaps it didn't allow them to do the level of integration they wanted.

Re:Windows Subsystem for Linux is out of beta by moomin on Friday July 28, 2017 @08:19PM (#14878673)
Well, the kernel API is implemented using the (rather undocumented) internal API. But so is the published Windows API. What it's literally not is Linux. However, you might want to call it GNU/Windows if you enjoyed watching people have seizures.
Re:Windows Subsystem for Linux is out of beta by skinnymuch on Friday July 28, 2017 @09:19PM (#14878950)
Haha. I almost spit my drink out imagining saying GNU/Windows to a specific friend.
Re:Windows Subsystem for Linux is out of beta by jaxn on Friday July 28, 2017 @08:04PM (#14878605)
I don't know that I would call it a subset either. It's bash, all of it. And you compile for Linux, and it works.

I develop a rails app on Windows using WSL daily. Ruby runs in Linux and gems compile to Linux, not win32. So there is no weirdness compiling something like ImageMagic.

Re:Windows Subsystem for Linux is out of beta by zbuttram on Friday July 28, 2017 @07:53PM (#14878543)
From what I understand it's mainly translating system calls. It's been described as being like a reverse WINE, hence everyone replying 'Not an Emulator' at you. :)
Re:Windows Subsystem for Linux is out of beta by tzs on Friday July 28, 2017 @08:54PM (#14878835)
> It's been described as being like a reverse WINE, hence everyone replying 'Not an Emulator' at you. :)

WINE originally stood for "WINdows Emulator". It was several years later that it became "WINE Is Not an Emulator". The change was for marketing reasons, not technical reasons, since nothing had actually changed in how WINE worked.

The first time anyone suggested "WINE Is Not an Emulator", as far as I've been able to track down, was late August, 1993, over concern that Microsoft might win its trademark case over "Windows" and come after WINE. Someone suggested WINE become WAW, for "WINE Ain't Windows", and someone else responded to that suggesting "Wine Is Not an Emulator".

Soon fear of the trademark issues abated and nothing happened for quite a while.

By 1997, the "not an emulator" usage had become an acceptable alternative. The Wine FAQ late that year said:

> The word Wine stands for one of two things: WINdows Emulator, or Wine Is Not an Emulator. Both are right. Use whichever one you like best.

The dropping of saying WINE was an emulator came in late 1998. The 981108 release notes said:

> This is release 981108 of Wine, the MS Windows emulator.

The 981211 release notes said:

> This is release 981211 of Wine, a free implementation of Windows on Unix.

From what I was able to find, it seems there were a couple reasons for dropping calling it an emulator.

One was that it could be used for more than just running a Windows binary on Unix via emulation. It could also be used as a library that you could link with code compiled on Unix. This provided a way to provide a native port of you Windows program to Unix instead of running the Windows binary in emulation.

Calling it an emulator unnecessarily pigeon holed it.

Another was that emulators that emulated hardware were getting popular. People were making emulators that emulated x86 hardware on RISC systems. They were making emulators that emulated older personal computers, like C64 and Apple II. They were making emulators that emulated console gaming systems like NES.

One thing all of those emulators had in common was that they were very slow, in the sense that emulating one instruction of the emulated machine took many instructions on the host machine. For emulating the old gaming consoles, or the old 8-bit personal computers, where the host machine was running two or three orders of magnitude faster, that was not a problem--the emulation could run as fast or faster than the original machine actually ran. But when emulating something more contemporary, such as emulating an x86 PC at the hardware level to run Windows on it, they were very slow.

Since hardware emulators like these were the only kinds of emulators most people encountered, people tended to see "emulator" and read "ridiculously slow". If they kept calling WINE an emulator, many people would think that means it is ridiculously slow and avoid it, so they stopped calling it an emulator.

Re:Windows Subsystem for Linux is out of beta by colordrops on Friday July 28, 2017 @08:27PM (#14878704)
If windows supports the linux system calls by apis that are compiled natively, would the functionality be considered native?
Re:Windows Subsystem for Linux is out of beta by wentoodeep on Friday July 28, 2017 @08:15PM (#14878650)
I've been using this for back-end dev since 14.04 distro (lastest update is xenial). Quite stable and very fast, no emulator or vm come close to WSL. Best gift from MS to devs after VS.
Re:Windows Subsystem for Linux is out of beta by dman on Friday July 28, 2017 @09:21PM (#14878966)
Does using the system change power consumption / battery life?
Re:Windows Subsystem for Linux is out of beta by dingo_bat on Friday July 28, 2017 @09:36PM (#14879021)
Not in a noticeable way. I'm sure there isn't much extra power usage.
Re:Windows Subsystem for Linux is out of beta by dman on Friday July 28, 2017 @09:50PM (#14879067)
Thanks!
Re:Windows Subsystem for Linux is out of beta by OhSoHumble on Friday July 28, 2017 @07:59PM (#14878575)
I had it break on me a while ago because there was no inode support and that's needed for hot-reloading of code when developing with web frameworks.

I'd rather just use Linux and not be surprised by anything.

Re:Windows Subsystem for Linux is out of beta by chrisan on Friday July 28, 2017 @08:10PM (#14878627)
Wasn't that the first beta release of insider? I thought they fixed inode support

https://blogs.msdn.microsoft.com/commandline/2016/10/07/wsl-...

Re:Windows Subsystem for Linux is out of beta by OhSoHumble on Friday July 28, 2017 @08:17PM (#14878660)
They did.

My point was that I just don't want to encounter bugs. When I run Linux, I get Linux. I already have it installed and I know how it works. I don't want to take the chance of a bug breaking my development workflow.

Re:Windows Subsystem for Linux is out of beta by BinaryIdiot on Friday July 28, 2017 @08:27PM (#14878703)
> My point was that I just don't want to encounter bugs.

You purposefully installed a pre-release version in which they heavily mentioned there would be major bugs and other unfinished things in it.

I'm not sure what you expected here but unless you're talking about the release version I don't think you're being fair at all.

Re:Windows Subsystem for Linux is out of beta by wfunction on Friday July 28, 2017 @08:29PM (#14878714)
>> Wasn't that the first beta release of insider? I thought they fixed inode support

> They did. My point was that I just don't want to encounter bugs.

What an awful response. If that's the problem you have then the solution is that you don't run beta software. You're not really making a sensible point by citing bugs in explicitly-marked-as-beta software as a reason to avoid release software that has already fixed those bugs. I would give the final version a try before complaining about nonexistent bugs.

Re:Windows Subsystem for Linux is out of beta by IncRnd on Saturday July 29, 2017 @07:45AM (#14880706)
That's exactly what he said, that in order to not encounter bugs he stopped using the software.
Re:Windows Subsystem for Linux is out of beta by wfunction on Friday July 28, 2017 @08:01PM (#14878585)
Would you mind elaborating a bit? What's the exact functionality that's required? Is it like notification support for file modification or something?
Re:Windows Subsystem for Linux is out of beta by zbuttram on Friday July 28, 2017 @08:03PM (#14878598)
Yep, but they fixed it already, fix rolled out with the last major Windows 10 update.
Re:Windows Subsystem for Linux is out of beta by wfunction on Friday July 28, 2017 @08:06PM (#14878614)
Ah okay, awesome.
Re:Windows Subsystem for Linux is out of beta by wvenable on Friday July 28, 2017 @07:52PM (#14878536)
It works frighteningly well; it's practically magic how well it works. I've even used it run GUI apps (mostly emulators for embedded software) via a Win32 X client.

In early builds I did have some file system weirdness but I believe that's all be resolved now. I expect the creators update will be a very solid version.

Re:Windows Subsystem for Linux is out of beta by semaphoreP on Friday July 28, 2017 @07:51PM (#14878529)
It works great for me. Like others have mentioned, it's not an emulator, so I don't feel sandboxed using it. The main downside is one of the caveats they mention: "Linux files are NOT accessible from Windows." Hopefully they can fix this in the future.
Re:Windows Subsystem for Linux is out of beta by ruricolist on Friday July 28, 2017 @08:02PM (#14878590)
Since you have to uninstall and reinstall WSL to upgrade it, it makes more sense to store your files on the Windows file system and symlink them into your home directory.
Re:Windows Subsystem for Linux is out of beta by dingo_bat on Friday July 28, 2017 @09:38PM (#14879026)
I just cd to my windows home and work there.
Re:Windows Subsystem for Linux is out of beta by shpongled on Friday July 28, 2017 @07:54PM (#14878546)
%AppData%\local\lxss\rootfs

Have fun

Re:Windows Subsystem for Linux is out of beta by russellsprouts on Friday July 28, 2017 @07:57PM (#14878562)
Careful: the Linux permissions of these files are stored in attributes of the files, and many tools don't preserve them properly. You'll likely lose access to files if you try this.

https://blogs.msdn.microsoft.com/commandline/2016/11/17/do-n...

Re:Windows Subsystem for Linux is out of beta by semaphoreP on Friday July 28, 2017 @07:57PM (#14878561)
I recall there were issues if you tried to modify those files in Windows. Maybe they've fixed that in recent updates, but my impression was that while I could see the files, I shouldn't be touching them.
Re:Windows Subsystem for Linux is out of beta by justabystander on Friday July 28, 2017 @08:02PM (#14878596)
Yes. Updates to those files didn't seem to be reflected in bash until I'd closed and reopened the terminal.
Re:Windows Subsystem for Linux is out of beta by math0ne on Friday July 28, 2017 @08:19PM (#14878675)
FYI, this does not work.
Re:Windows Subsystem for Linux is out of beta by dannysu on Friday July 28, 2017 @08:24PM (#14878687)
It's still way too slow for me using tmux.

File system performance seems bad. Have tried multiple times to use it. First when it was first announced, and then again when Creators Update came out.

But... it's just not good enough yet. Hopefully the Fall Creators Update improve things.

For now, running a Linux VM is still way faster.

Re:Windows Subsystem for Linux is out of beta by freehunter on Friday July 28, 2017 @07:50PM (#14878523)
It's not really an emulator. It's more like a virtual machine that runs Linux in the background and lets you use the commands. You can install Ubuntu with it and it's officially supported. If it didn't work, I'm sure Ubuntu wouldn't run.
Re:Windows Subsystem for Linux is out of beta by bitwize on Friday July 28, 2017 @07:55PM (#14878551)
What it is is what BSDers call a "kernel personality". It's not a virtual machine; the Windows kernel just knows how to load Linux binaries and translate Linux system calls to the corresponding Windows calls.
Re:Windows Subsystem for Linux is out of beta by tyrw on Friday July 28, 2017 @07:52PM (#14878541)
Thanks for the clarification. I guess I'm having a hard time classifying it, since you can use an actual VM but this seems like something less than that.
Re:Windows Subsystem for Linux is out of beta by mkl on Friday July 28, 2017 @09:42PM (#14879046)
Correct, it's not a virtual machine at all. It is a reimplementation of the Linux kernel's API. Most userspace Linux programs run as normal and can't tell that the system calls they do aren't handled by the Linux kernel.
Re:Windows Subsystem for Linux is out of beta by nickthemagicman on Friday July 28, 2017 @07:52PM (#14878542)
Alot of stuff works great. I had a pretty high functioning dev environment. Hit snags when I tried to interact with the hardware. Like for setting up VPNs or networking tools. I think because it doesn't manage the hardware.
Re:Windows Subsystem for Linux is out of beta by IncRnd on Saturday July 29, 2017 @07:40AM (#14880694)
After this was initially announced I ran apt-get a a few times for dependencies, then compiled OpenSSL inside the box. I also got linux apps working with a gui, which was quite possible.

On balance, due to security issues, I decided not to use WSL for day to day.

Re:Windows Subsystem for Linux is out of beta by SPACE_LAWYER on Friday July 28, 2017 @07:47PM (#14878504)
It's not an emulator
Re:Windows Subsystem for Linux is out of beta by dboreham on Friday July 28, 2017 @08:06PM (#14878616)
Depends on your definition of "emulator". Since it is a thing that emulates Linux kernel calls on top of the NT kernel...it is definitely "emulating".
Re:Windows Subsystem for Linux is out of beta by drdaeman on Friday July 28, 2017 @08:32PM (#14878732)
A mirror of WSL is WINE, and we know that WINE is Not an Emulator ;)

But, yeah, jokes aside - it depends on the definition.

Still, the translation (or emulation) layer is partial at best. No cgroups (so no native Docker and rkt would work only with fly stage1 and a few patches), sockets are limited (e.g. a number of setsockopt stuff is missing), no tun or tap devices, no netfilter subsystem at all (so no iptables/iproute2/nftables), no GPU access, etc etc etc. Even though it's out of beta it's a bit early to think of it as a "real deal". Best it can do is run some desktop apps and build some software. Would probably work for basic webdev stuff (without containerization), but that's about it. It would probably never come close to the real thing, just as WINE probably won't ever replace Windows. But they try.

And, of course, it's non-free.

Re:Windows Subsystem for Linux is out of beta by BinaryIdiot on Friday July 28, 2017 @08:31PM (#14878723)
The dependency to make this work is transforming the calls but the Ubuntu itself is not. Not everything has to run through that translation layer either, only specific types of calls to make things work. Code that isn't using specific *nix commands will run like normal without that layer.

It's pretty complex. I don't think I would call it an emulator but I can see why someone would.