This isn’t Bash or Ubuntu running in a VM. This is a real native Bash Linux binary running on Windows itself. It’s fast and lightweight and it’s the real binaries. This is a genuine Ubuntu image on top of Windows with all the Linux tools I use like awk, sed, grep, vi, etc. It’s fast and it’s lightweight. The binaries are downloaded by you – using apt-get – just as on Linux, because it is Linux. You can apt-get and download other tools like Ruby, Redis, emacs, and on and on. This is brilliant for developers that use a diverse set of tools like me.
Windows just got cancer.
Update: here’s more information on the technical implementation. In short, it’s a sort-of reverse WINE – it translates Linux syscalls to Windows syscalls in real time.
Native Bash on windows already exists via mingw and MSYS which is not the same as cygwin it’s just a GCC environment that builds native EXEs.
That said I am curious if this is windows + Linux compat layer and native Linux executables or if it is Windows + recompiled exes for windows?
I guess a dead giveaway would be PE format vs COFF.
Edited 2016-03-30 16:46 UTC
Apparently it is running in a windows implementation of Linux libraries and executes ELF executables.
Reverse-wine.. Probably without X11 though.
Theoretically you should be able to solve that by installing a Win32 X11 server (like you can also do on OS X). Anyone know of a good free open source X server already?
Xming is the best one.
Looks good based on the screenshots.
From what I understood the libraries are the same. It is just an adapter from Linux kernel to windows.
Basically it translates Linux to windows at the lowest possible point (the kernel).
Doesn’t matter you can run a native X11 already on windows.
The Arctica project probably has the best and most up to date X11 for windows. https://github.com/ArcticaProject
This is GNU/Windows.
Check the update link. Linux compatibility with Linux ELF executables. I like it and cant wait for it.
I believe that this is Microsoft’s latest extensions to HyperV doing this.
I was running Fedora Linux on HyperV last year, so this isn’t anything terribly special. What does look nice is how automatic the setup is. When I did mine I had to configure virtual bridges, storage volumes, etc. With this it looks like a really simple install.
I believe this is the same tech that Microsoft plans to use for Docker containers on Windows, and for running Windows XP, 7 and 8.1 apps once Windows 10 advances far enough to make library compatibility difficult. They’ve said that in the future, compatibility will be done by running old Windows OS and libraries virtually. But transparently so users don’t even notice.
It’s not Hyper-V. It’s presenting a new personality on top of the NT microkernel like they used to do with DOS, OS/2, and Interix.
DOS wasnt a personality, it (and Win16) were actual virtual machines
Edited 2016-03-30 20:05 UTC
So, they’re bringing the Linux user land to Windows?
I used to use Windows, and I used Cygwin on it.
It wasn’t until I switched to an Unbuntu install, and then, eventually, Mac OS, that I could really appreciate how awful the Cygwin layer was on Windows.
It was better than nothing, but not by a lot. Boy, was it slow.
So, it just seems that this is going to be a native bash port with an associated user land of /bin and /usr/bin utilities I take it?
And they’re calling it “Ubuntu”?
I guess this is a good thing as long as it’s better than Cygwin. I’ve never used the MS Unix utilities.
Could you elaborate on your Cygwin problems? I use it a lot now. After setting a few aliases and fancying up the color syntax highlighting, I honestly feel no difference in quality from my “real” bash in Linux installations.
I use msys on Windows, basically a light install of cygwin.
The performance of the standard utilities is fine in cygwin, and since these are native win32, it will be interesting to see if this reverse-wine keeps that performance.
The windows slowness comes when running shell scripts which tend to spawn a lot of sub processes. IIRC GNU/Linux clone call is relatively cheap, compared to win32 createprocess.
Well, seeing as the linux calls are being translated into windows calls, I have a hard time seeing that this inverse wine will be faster than cygwin.
Is this the embrace or are they already in the extension phase?
Either way, you can count on Ubuntu gaining enhancements that make it unique among distributions. Maybe some carriage returns and stone-age charsets for maximal synergy.
Are you supposed to be doing everything in PowerShell if you must drop to the command line?
Hell must be freezing over in Redmond.
That’s pretty neat actually. I am on OS X so I have my bash shell and everything is good. My gaming machine runs Windows 10 and I would like to try this out.
This was the prior approach used by Win4Lin, using technology from NeTraverse. It did the same thing, having the windows calls translated to syscalls. It was blindly fast because you were running native executables, no emulation needed. Unfortunately, it only supported the Window 9X branch. When Windows 2000 came along, based on NT, there was no ability to use the same technology. Instead, they became just another virtualization option like VMWare, etc
So… you may not see this as a big deal, but I do. I am glad to see a similar technology as the old Win4lin 9x finally come to 64-bit Windows NT. YMMV.
WINER
Doesn’t this lock Ubuntu to microsofts abi if they want their code to run? There’s a lot of things which can go wrong here for Linux.
It can be updated, just like Ubuntu on your PC can be updates
No; there are two SYS files that provide the Linux kernel interface and the rest of the subsystem – lxcore.sys and lxss.sys.
Since this is just a presentation of standard Linux kernel interfaces, one could presumably run any distribution on top. They’ve said that when you use apt to upgrade/install software, it pulls it from standard Ubuntu repos.
Nope, absolutely not. In fact it’s the opposite: Microsoft must track the Linux ABI if they wish to keep this up to date.
This is what I meant, Microsoft/Ubuntu have to track the ABI to keep the software on Windows compatible with the Linux Kernel.
There is no “Microsoft ABI”. The ABI being implemented is the Linux kernel ABI. It’s the same way that WINE tracks the Windows ABI.
To be crystal clear here: Ubuntu are not “porting” anything. There is no “Linux for Windows” ABI. The binaries being run in the demonstration where straight Linux amd64 ELF binaries. You can compile something on Linux, copy it to Windows, and run it.
No. There is nothing that can go wrong for “Linux” with this.
Actually, there is a lot which can go wrong, even if the “extinguish” part will not be realized.
1. Embrace: Development of software substantially compatible with a competing product, or implementing a public standard.
2. Extend: Addition and promotion of features not supported by the competing product or part of the standard, creating interoperability problems for customers who try to use the ‘simple’ standard.
https://en.wikipedia.org/wiki/Embrace,_extend_and_extinguish
Edited 2016-03-31 13:40 UTC
Again…No. Whatever happens with “Linux” on Windows has nothing to do with Linux as a whole. There is NO incentive to create a “Linux” that is not interoperable with other Linux distributions. The whole point is to allow developers access to a standard Linux environment. Why would ANYONE want to develop for some non-interoperable MS Linux environment? If you want to target Windows use Windows libraries. Even if MS tried to do what you describe it wouldn’t work.
Because there are a lot of stupid people out there. I’ve seen windows only programs that include cygwin for the purpose of writing bash shells scripts that run windows .COM files as well as perl files.
I don’t doubt that there will be absurdly stupid things people do with this.
Sure a couple of idiots might do it but that doesn’t detract from my point that this will have no negative effect on Linux.
If it was the Linux compatibility of FreeBSD, NetBSD oder Solaris we are talking about, I would agree with you.
However, this is Microsoft Windows. If the Windows Subsystem for Linux gains any significant traction, the features which it supports (or does not support) will have a profound impact on how ISVs will distribute Linux binaries in the future.
Note that I am not claiming such a thing is even likely happen or that Microsoft has any incentive to do it. I just say that it can conceivably go wrong and Microsoft can hurt Linux here if the market aligns to them and they so choose.
The problem is this is what we have been hearing for 10 or 15 years or more now. I remember when Mono and C# was going to destroy Linux. The reason Microsoft is doing this is to give people access to a Linux environment where their Web apps will typically be living in the real world. It makes no sense to make it incompatible with other Linux environments and it makes even less sense for people to target Microsoft’s Linux subsystem for their own application over that of other Linux systems or just windows API itself. It’s like programming against WINE without a care if it actually works on Windows. Why would anyone do that? And if they did would anyone even use that sotware?
because Ubuntu really gives a hoot about MS….
It has the rootfs in a writable directory (C:\Users\username\AppData\Local\Lxss\rootfs\); it is to be expected that you can substitute the ubuntu rootfs with any x86_64 linux rootfs (debian, arch, etc)…
Interesting times, indeed.
Edit: sp —
Edited 2016-03-30 20:05 UTC
This is pretty cool and could come in handy but what does Canonical gain from this that can help enrich the Ubuntu feature set? Are the benefits only one-sided in Microsoft’s favor?
How about we see the opposite get implemented for Ubuntu, such as this setup?
http://s22.postimg.org/ixj8ozhzl/LPowershell.png
http://s23.postimg.org/iydf3dtm3/Lwinstore.png
You have to know the answer to this – Ubuntu running on a bunch more computers. They kind of like that.
The sky is falling.
What a weird thing to type in a title, but I think a true thing. MS are transitioning from an ‘OS and apps’ company to apps and services.
MS see they’ve failed to dominate the ‘device OS’ market, and they are unlikely to succeed down the line. As tablets become more capable and start to morph into devices that take a keyboard and can be used for significant work, the Windows-with-MS-applications/MS-applications-with-windows lock-in becomes fragile. What they need to do is create an ‘MS experience’ everywhere. To do this they need to:-
1. Make the full .net run anywhere: they’ve open sourced it so we can expect the mononistas either to achieve mono/.net feature parity or to implement a full port of .net. This gives them MS apps running anywhere.
2. get the back office stuff working elsewhere: SQLServer now ported to Linux. Other stuff compiled to .net?
3.Split the Win GUI from the underlying OS, as it was pre Win95, (and as GUI’s are in the *nix world), and port it to other OS’s. TBD
Once this is done, they cease to be vulnerable to technology that comes pre-loaded with another OS, their corporate customers never get presented with a point in time where it might be worthwhile transitioning their infrastructure away from MS, and individuals install MS apps and use MS cloud services because it’s what they are familiar with from work.
People running Windows (GUI) on another underlying OS will have, and will want to have, GNU tools available.
With these available on Windows (OS), the windows experience is the same in Windows (GUI) on *nix as it is in Windows (GUI) on Windows (OS).
Or of course this could just be speculative BS, but it’s fun, isn’t it? We’ll know for sure if/when cifs/AD gets ported (they won’t rely on Samba).
Edited 2016-03-30 23:45 UTC
I don’t think so. Windows will always be Windows (the OS). Way too many dollars invested.
This is just Microsoft desperate to stop developers running into Apple. Take a look to any conference. Apple hardware everywhere. No more Dell, HP, Vaio, Lenovo. Only Apple.
This is the first step. Full compatibility with Linux executables.
Next step (no pun intended) will be in OEMs. Microsoft will tell OEMs to sell hardware with BARE WINDOWS, no additional software or you lose your Windows logo licences. If your hardware doesn’t work on bare Windows, you’re out of business.
Sunk money. The my thesis is that they have to see that they cannot maintain OS dominance. Their best future is to create a platform agnostic ecosystem under for their other products and services, under their control.
Beautiful comment.
Anyone remember COREL Ventura Publisher?
Over Digital Research Graphical Enviroment?
Over Microsoft Operating System?
https://en.wikipedia.org/wiki/Corel_Ventura
https://en.wikipedia.org/wiki/Graphical_Environment_Manager
“At this point [1985!], Apple Computer sued DRI in what would turn into a long dispute over the “look and feel” of the GEM/1 system…”
And now…
http://www.theregister.co.uk/2016/03/31/xamarin_tools_code_free_and…
…let’s make it normal to develop with .net for any target.
They appear to be moving quite fast.
Edited 2016-03-31 22:09 UTC
I am forced to use Windows 7 at work, where we are heavy users of Cygwin. Using Python from Windows might be simpler with this — I’d love to forget about WinPython “Installations” and “Distributions”. On the other hand, I guess a Python GUI runing on this “Winduntu” of sorts would need an X server, which may add as much complication as had been removed… Does this come with an appropriate one?
BTW, I hope bash comes compiled with the option to not choke on windows line endings.
1. How do they handle the line ending translation, and are they making Notepad smart enough to handle it (I use Vim myself, but it would be nice to not have to translate files for friends who can’t handle modal editors or emacs)?
2. How do they handle the distinct lack of file extensions in most Linux systems (I would absolutely love it if Windows finally learned to not trust file extensions and look at metadata in the file itself)?
3. Did they finally get a terminal emulator that actually works correctly (supports ANSI and VT100 escape sequences properly)?
4. Are they still adding SSH client support to PowerShell?
5. What do they report for uname?
6. What do they do about the syscalls that they can’t provide correctly (membarrier immediately comes to mind, but there are almost certainly others, including some from POSIX)?
7. Did they finally learn to update files in place (if they didn’t then it’s going to break a lot of software for Linux)?
8. How do file locks, process space, and such interact (ie, if I call flock on a file from the Linux layer, doe it show up as being locked from the perspective of Windows apps)?
9. What kind of overhead does it have compared ot running Linux natively on the same hardware?
10. Did they add the ability to turn off broken Windows ‘features’ that have working Linux alternatives (the mDNS stack is what I personally would love to turn off, but there are other things that come to mind)?
Well… Since Win32/64 API sits itself on top of non-public, lower level NT API, there could be a way to implement fork and the likes more efficiently than, say, Cygwin does.
I would have never imagined Microsoft doing this, but I have to say, this is pretty damn good. As long as they don’t pull some sort of “Power Shell is the only thing getting X or Y feature that is a deal breaker for administering windows properly”, this will actually make me want to manage a windows/linux mixed environment with joy without having to learn Power Shell. I’ve been putting it off for a long ass time since it’s so… different.
It is better than cygwin for really only two reasons:
1) Easier to update
2) More packages available
It really shouldn’t be any faster.
http://babun.github.io/
Been using this on Win 7 machine at work. Works pretty well. It won’t be as good as what is coming. It essentially Cygwin but a bit nicer.
https://github.com/dthree/cash
I been using this on my laptop, obviously it requires node and is fulfilling Jeff Atwood’s prophecy.
Obviously these won’t be needed once this new layer is in place.
Edited 2016-03-31 17:25 UTC
Have you ever used cygwin to do any seriously intensive work? It’s crazy slow!
Compared to raw Linux, compiling large projects in cygwin could takes hours instead of minutes. I remember letting something compile for over 24 hours on a cygwin install, when the exact same hardware running Linux compiled the same project in under an hour.
Since this new endeavor maps the underlying syscalls directly, it is probably much much faster. I do wonder how they’re dealing with some of the filesystem differences (case-sensitivity, support for special characters, etc.) without some serious hacking… that should be interesting.
Ignoring the slowness, it often wasn’t clear whether you were in a Windows file system or a ‘Nix file system. Doing something in one often gave you unexpected results.
Also, recently, there seems to be some issues of how well Cygwin supports Windows 10.
So this new move by Microsoft and Ubuntu could be very cool. One machine to do work on and play games. Will that machine be the XBox? 🙂
I have used cygwin to do what I would consider to be seriously intensive work, but only single threaded no forking.
Most of that is cli piping of bash commands, although I have run x server, kde apps and other crazier stuff. It can defiantly be slower for some file system intensive tasks than linux.
Cygwin apps are compiled to talk to windows 32 api calls. Why should that be slower than going through on the fly mapping of linux to window 32 api calls? It seems like if anything that would be slower.
It seems you are misunderstanding what the new subsystem is doing – it’s avoiding win32 entirely and mapping linux kernel syscalls to the nt kernel.
Cygwin also uses a bunch of libraries and compatibility layers to make everything “work” – and I’m guessing these are extremely inefficient.
In any case, this will be easy to actually test once we get our hands on it, but my money is on the new syscall mapping being far faster than cygwin’s nasty win32 api mapping.
I wonder if the applications can use other system functions, like the GUI. This would make porting graphical Ubuntu applications only a matter of time. And then, what would this mean to the GNU-ecosystem.
Edited 2016-04-01 13:40 UTC
“For developers, that means getting more breathing space in working with Bash, more options in helping to bring software to the widest possible audience.”
Breathing space. On that ‘bunny jumping’ for not to look, feel and behave like the competence, everybody [experienced users and developers included] were being left without it.
http://techxplore.com/news/2016-04-ubuntu-environment-windows-optio…
“This is a developer-focused release…” About time, and thanks for listening. Endeavors satisfactory to all parts go farther away into the future.