Running Bash on Ubuntu on Windows!

Sign in to queue

Description

Running Bash on Ubuntu on Windows? Really? Yes, REALLY! In this video we’ll outline why and how we’re enabling Windows 10 to run native Linux apps and tools directly on Windows! Watch to learn more and to see Bash running on Ubuntu on Windows!

There's a ton to learn on this topic! In addition to our Channel 9 Live coverage at //BUILD 2016 we have a number of deep dives that really get into how the feature works at an operating system level:

If you prefer to read more on the Windows Subsystem for Linux make sure to catch up on the official documentation and blog.

Day:

0

Session Type:

Pre-recorded

Code:

P488

Embed

Download

The Discussion

  • User profile image
    Don

    Sounds like: DOS command prompt is dead, Powershell is dead - next thing is Linux Bash.

    I would have prefered if this investment had been used to improve Powershell instead of introducing one more alternative.

  • User profile image
    JuanKRuiz

    Great! all the Web development community appreciate this a lot!! that's the real value of a company that loves their development customers.

  • User profile image
    Nemonik

    That's it. I'm buying a Surface. Pay attention Apple, it is by how thin you make your bloody device.

  • User profile image
    BitCrazed

    @Don: PowerShell? Dead? FAAAAR from it! PowerShell is a fabulous tool with some incredibly powerful features that integrates deeply with Windows and most of Microsoft's platforms, technologies and tools. Unlike Bash, PowerShell enables you to pipe object graphs between commands/scripts, reducing/eliminating the need for text transformation tools like sed, awk, etc.

    Bash, on the other hand is frequently used in open-source projects and Unix/Linux based platforms. It has been added to Windows primarily to make Windows your home for developing code for all projects, platforms and devices.

    We believe you should be able to run both, using their strengths when you need them, allowing you to work how and where you prefer, from Windows.

    Please be sure to visit our Bash UserVoice and post ideas/asks/wishes - we take your feedback very seriously!

  • User profile image
    BitCrazed

    @JuanKRuiz: Many thanks - we're very flattered! We build this stuff for devs like you because you're like us - you just want to get your stuff done and have as much fun as you can doing it! Look forward to hearing how you get on with Bash on Ubuntu on Windows!

  • User profile image
    mcornella

    Lol. That history expansion at 12:38 ("Rawr!!" expands to "Rawrclear").
    It must really be the real thing haha

  • User profile image
    K G

    How many times do you say "xyz...running on ubuntu...running on windows"

  • User profile image
    John

    Questions...

    What provides the root filesystem for the Linux subsystem? If C:\ is /mnt/c, then / clearly isn't the actual root of the NTFS filesystem.

    How are you mapping filesystem permissions between NT and POSIX? Many have tried to square this circle, but I've yet to see a really good solution.

    How do Win32 apps start Linux programs and vice versa? Windows relies on filename extensions to identify "programs", whereas Linux relies on executable bits in filesystem permissions.

    The Linux mmap system call can map on 4K page boundaries. The NT kernel (ZwMapViewOfSection) can only map on 64K boundaries. I've heard that this difference prevented prior attempts to fully emulate Linux syscalls on Windows. Did you change the Windows 10 kernel to fix this?

    Will the Linux Subsystem be included in Windows Server 2016 RTM? Nano Server?

  • User profile image
    MrSparc

    Wow! Congrats team for amazing job. Now I'm dreaming the team includes this layer also in Window 10 Mobile and then I'll can run native Linux apps in my phone.... wow! A new era comes here... Microsoft loves Linux... really ;-)

  • User profile image
    Pietro Sammarco

    From a long time UNIX power user standpoint I am absolutely happy about seeing this coming, however I would have preferred to have a real UNIX to Windows Subsystem based on either FreeBSD or OpenBSD. Anyways, I am sure this will work out just fine, but please keep systemd out of the way!

  • User profile image
    s3curity​Consult

    wheres the preview to download and try>?

     

    It should be in server 2016 no>?

    I mean we're all waiting for Server 2016 to be RTMed already, it;s gotta be at least a release candidate by the end of build.  Anything coming to windows 10 has got to be making it into the server as well.  However, Powershell is so much more important to me than bash, I mean powershell already has so many aliases already baked in, It;s really not that big of a jump.Plus who doesn't already use git-scm to practically use bash in the command shell already,

  • User profile image
    kk kk

    wow

  • User profile image
    andrei

    is this wine for windows ?:)

  • User profile image
    abryden657

    Any chance of CUDA support? That would be amazing!

  • User profile image
    Mehdi Hasan

    All files and directories are 777? Is there any plan to bring native *nix file permission support? This is necessary because a lot of times we need git to pick up the file mode changes on our repositories.

  • User profile image
    canhazunix

    What about proper access to windows usermode?
    The /proc filesystem was rather empty. What I'd really like would be to be able to stop windows processes from running by issuing a kill command on bash. Not having to be present for a silly tech support issue would be just excellent.

  • User profile image
    Meteorhead

    Please, hook this stuff into Visual Studio as a Platform Toolset. No MinGW, but native ELF binaries tested on the same box... :D

  • User profile image
    millenium

    Hi, there is one fundamental question... What about the case sensibility? Is "New Folder" equal to "new folder"? (6)

  • User profile image
    Pete

    This is true magic. Thanks guys for bringing this in for web devs loving Windows but always struggling to get things up and running. You just put us on equal with osx and nix devs.

  • User profile image
    Aixki

    Oh my god, this is happening ! I can't believe it ! I think this is the biggest innovation since Windows 95. And this is only the beginning...

    Thank you MS !

  • User profile image
    jbove

    @Don: I think you're missing the point. They did this to win back millions of (web) developers who are today still choosing Mac machines over PCs because of the Unix-like shell it offers and otherwise have to resort to dealing with Virtual Machines or "patch" - like integrations like GitBash or the Cmder Console Emulator. Personally I am delighted Microsoft did this!

  • User profile image
    watermelon

    This is kind of a mix feeling for me. Have been using Cygwin for the past few years just to get something done faster than I can do it with Windows apps/tools. Part of me being happy because Microsoft is committed doing it. The sad me would be thinking the future of Cygwin. Would the project simply be dead?

  • User profile image
    Mahmut​Gundogdu

    Can docker works on this system?

  • User profile image
    liso

    @K G: N-1 too many times.

  • User profile image
    woern123

    the version-number is 04.01.2016 right? ;-)

  • User profile image
    FELIX

    THIS IS APRIL FOOLS. LISTEN FOLKS. THIS IS APRIL FOOLS. LISTEN FOLKS. THIS IS APRIL FOOLS. LISTEN FOLKS. THIS IS APRIL FOOLS. LISTEN FOLKS. THIS IS APRIL FOOLS. LISTEN FOLKS. THIS IS APRIL FOOLS. LISTEN FOLKS. THIS IS APRIL FOOLS. LISTEN FOLKS. THIS IS APRIL FOOLS. LISTEN FOLKS. THIS IS APRIL FOOLS. LISTEN FOLKS.

  • User profile image
    Martin Hvidberg

    Where is the shanselman/sinatrademo on github ???

  • User profile image
    intelman

    At 5:15 AMD eh? Before that Genuine Intel? Unix still freaky about AMD's ownership of x86-64?

  • User profile image
    Anon

    How about taking Brian Cantrill up on how well "difficult" programs run: https://news.ycombinator.com/item?id=11392119 (One Hundred Language Quine Relay, Go, strace, tcpdump, systemd)

  • User profile image
    Rob

    Very cool! The only reason I use OS X for dev is for native unix, but I struggle daily with things like Finder sucking way more than Explorer and windows not snapping and maximizing the way I want them to.
    If this works and I can use tools like nfs, ack/ag, and rsync I will never leave bootcamp :)

  • User profile image
    Mike

    This made my day - love the direction Microsoft is going :)

  • User profile image
    Daniel

    Okay, now we have to get Powershell running on Linux, or it's dead. History shows very clearly that when there's one language that works everywhere, very few people will bother with one that *doesn't*.

  • User profile image
    Paul B

    Why by the Windows cow when you can get the Bash for free?

  • User profile image
    ankushnarula

    This is a great first step - but it could be much more meaningful if it was part of every default Windows installation.  

  • User profile image
    ankushnarula

    IPC/Named Pipes?

  • User profile image
    Marius Bancila

    Not something that I'll be using soon, but pretty amazing though.

  • User profile image
    Rykel

    Just having a regrettable feeling that Microsoft is caving in and doing the previously unthinkable stuff NOT because it is a great thing to do, but because it is dying... and if so, I do not see how this will help Microsoft win back its marketshare nor do I wish to see the company regain much of its former glory.

    Of course, if Microsoft offers a word along the lines of, "Well, we have opposed GNU/Linux for a long time but we realized we were wrong all along and are determined to do it right this time round because it is the greatest thing we can do for developers..." then I guess all will be well in Linux-Windows land.

  • User profile image
    fox

    Great news, now we only need to get rid of the Windows GUI and anything is fine :)

  • User profile image
    Shaun

    How do I get hold of this, and can I run it on my Raspberry Pi 2 IoT Windows 10 platform?

  • User profile image
    Ashish

    Oh my god! This is an orgasmic demo!

  • User profile image
    asmodeus

    The guy on the left keeps imitating a moron and being really disturbing, making this video hard to watch..
    Could you do a normal demo, showing what you can do without acting like an idiot?

  • User profile image
    Robert

    Will we bet XTerm server in Windows which will be working with apps working with those linux apps on local machine?

  • User profile image
    payini

    This is amazing. Way to go Microsoft.

  • User profile image
    Kevin​Trumbull

    @BitCrazed:The problem with piping objects is that it's MUCH harder to figure out why things aren't working.  A systems enginner and I tried activating 10,000+ licenses on Office 365 recently (following Microsoft's guide to the letter) using PowerShell and it didn't work.  It took WAY too much time to figure out how to get this to function.

    I never have that much trouble with bash since it supports non-object-oriented linear scripts which I find tremendously easier to sequentially step through and debug.  With any *nix shell I can see the output of every command every single step of the way.  Of course this could be due to the fact that I have a background in *nix systems administration and extensive use of regular expressions and not "programming".

    Certainly for larger projects object oriented is the way to go, but for simple (extract info) & (execute command using info) it always seems to require more code, make things more complicated, and harder to debug.

  • User profile image
    Karl Botts

    Well, good luck. This is at least Microsoft's third try to do essentially the same thing. There was the POSIX subsystem of WinNT; then the "Unix Tools for Windows" (I think it was called). Both eventually failed and you orphaned them.

    Meanwhile, Cygwin has been successful for more than twenty years, and going strong. I have been using Cygwin under Windows for most of that time -- since I switched from "MKS toolkit", I don't remember when. Cygwin works superbly for me. I have an entire ecosystem of scripts and tools and aliases and stuff, with a glue file called "portable.bashrc", which I maintain across Linux and Windows, and have for many years.

    I will try your new effort, when I think it is tolerably complete and even fairly close to Cygwin, and I am pretty certain you will not orphan this, too. But I ain't gonna jump soon, nor hold my breath.

    The fundamental thing you got wrong with PowerShell was that you did not understand that the fundamental purpose of a CLI shell is to interact with other existing CLI software tools. All such tools communicate in plain text, via the standard input and output streams: that is what gives them their power. See Kernighan and Pike, "Software Tools", circa 1975. When you made PowerShell's standard input and output be not plain text, but binary streams, or at best streams of prettified text full of colorization and escape sequences and miscellaneous whitespace and junk, you made it practically incapable of interacting with existing CLI software tools. And that fundamentally breaks it as a shell.

    I am today a pure Windows/.NET programmer. I use the Windows development platform on Windows hosts, for 95 percent of my work. I do not need gcc or any Unixy development tools under Windows. I just need a good set of command line software tools. Windows has nothing like that, and never has.

    I would love to be able to use PowerShell with its superb access to the superb .NET libraries, as another tool in my Cygwin toolchain. I have tried, many times. But because you broke the standard input and output of PowerShell, it is useless. I can always do the job better and quicker with the Unix software tools than via PowerShell.

    What I don't understand is, why doesn't Microsoft just obtain the right to distribute Cygwin with Windows? The Cygwin people have solved all the problems, myriads of them, most of which you have not even thought of yet. They have succeeded; you have failed. I gotta believe, just a little money thrown in Red Hat's direction would get access to the code and the people. Why start over, yet again?

  • User profile image
    Prabhat

    can anyone tell me how do i install the bash in new build?

  • User profile image
    Dejan Lekic

    But this has been around for over a decade. - Take a look at the coLinux (http://colinux.org) project! These guys make it like WOW, Microsoft did something great. :)

  • User profile image
    Joseph Carras

    This is great guys! Looking forward to checking it out on action!!!

    Keep up the great work!

  • User profile image
    haoxiong

    @BitCrazed: Wow..That's great! Thanks for explaining.

  • User profile image
    tekguy

    Thank you for doing this!

  • User profile image
    Jedrek

    I see that the user root directory in the “Windows Subsystem for Linux” is in a very strange place on Windows. The path is very long.
    If the user will try to install any big program,
    then the problem with the path length on Windows may be very annoying.
    Of course, we can install the program in a different place … but … it doesn't look like a good start.

    I hope that somebody will be updating the software (gcc, other tools) otherwise this product will be as good as Interix, SUA and other products related to the Microsoft POSIX subsystem.
    I see no plans for any graphical tools (e.g. xserver), that was one of the reasons which killed Interix, SUA etc.

  • User profile image
    Matthew Persico

    http://colinux.org is not the proper analogy. CoLinux is a port of the kernel. What these guys have done is equivalent to Wine, which is a compatibility layer of software that takes system calls made by Windows binaries and translates them in to the proper Linux kernel calls. MS has written compatibility layer of software that takes system calls made by Linux binaries and translates them in to the proper NT kernel calls. The other difference might be that WINE is not integrated into the Linux kernel where as the Windows Subsystem for Linux is integrated into the NO kernel; someone who knows more than I do, please comment.

  • User profile image
    Niner144678

    This is really an awesome feature and I cannot wait to try it out.

    P.S. No 'return 0;' in your C main() function - naughty!

  • User profile image
    Berri

    Is this System running on SCO UNIX?
    On wich Unix it will be running?

  • User profile image
    BrunoMedina

    This is the kind of things that makes me love this company!

  • User profile image
    Jo The

    Has a person in it, (23 years old) it the first time i see microsoft do something to really improve there system. SSH have been here for years, and bash is alot easier to use for scripting/programming
    Can't wait to test this out

  • User profile image
    pissed off dude

    Microsoft has done nothing but allow droves of hackers to attack my system for 2 years now and totally destroyed a $700 laptop in the process. I tried to report it, never got an answer back and then I look up one day and Microsoft is trying to connect everyone to everyone. WTF? You call yourselves developers? You are nothing more than wreckless idiots! i have spent my life working hard at not knowing anyone, who are you to connect me to such idiots?

  • User profile image
    Sergey

    This is the only thing that keeps me to use MAC.

  • User profile image
    Lattamore

    This is not what we meant by its time to Bash on Windows....

  • User profile image
    VijayB

    Awesome !! This is really great value addition.

  • User profile image
    smf

    I watched this video and completely missed that this was Linux tools running on Windows. Could you mention it more next time?

  • User profile image
    gjuro

    @Don:of course not... bash is just good for bash type of activities...  bash can't do powershell type of activities...

  • User profile image
    Aaron Fulkerson

    Has anyone had any success installing Rails? Things always seem to break when it comes time to build Nokogiri.

  • User profile image
    Anurag

    How can i download that

  • User profile image
    texastig

    I was following Russ and Rich in the video but I don't have a /dev directory anywhere. Can someone help me to download it for find it?
    Thanks

  • User profile image
    MagnumOpus

    @Aaron Fulkerson: this thing is still in alpha stages. It's released so they can get feedback. Symlinks don't work.

    I was hoping this would be 95% working and the feedback they could get would refer to the corner cases between this and actual Linux (i.e. a beta). All in all, just sit and wait a bit for this to be fleshed out more.

  • User profile image
    Maninder

    Woohoo.. Finally Standby all Windows and SQL Server Junkies .. no need to switch to other technologies.. SQL Server is also Rolling out a Linux version and should be interesting.. I am damn excited guy...

  • User profile image
    Geetha

    very informative blog. Helps to gain knowledge about new concepts and techniques. Thanks for posting information in this blog

  • User profile image
    Naved

    Awesome

  • User profile image
    saki

    wow amazing videos of how to run bash ubunto on windows. keep sharing more useful information.

  • User profile image
    twoflower

    Russ Alexander, Rich Turner

    What I do not understand from Windows why they do not create their own distro, say called Winux, and rather use lubuntu.

    Nice marketing for UBUNTU!

  • User profile image
    xalikoutis

    Amazing!!!!!!!!

  • User profile image
    BitCrazed

    @twoflower: We'd rather create a distro-agnostic subsystem which can host many different distro's that you need in your environments.

    If Microsoft created a distro, would it meet YOUR needs, or those of people running Debian/Slackwware/Debian/etc. The Linux distro graph is highly variant and specialized: https://upload.wikimedia.org/wikipedia/commons/5/58/Linux_Distribution_Timeline_with_Android.svg

     

     

  • User profile image
    BitCrazed

    @Berri:This isn't running on any Linux or Unix kernel - it's a new layer in the NT kernel that acts and behaves like a *NIX kernel would, when running native *NIX command-line tools.

  • User profile image
    BitCrazed
  • User profile image
    BitCrazed

    @s3curityConsult:No - this is a client-side technology to help developers be more productive on their own boxes.

  • User profile image
    BitCrazed

    @Mehdi Hasan: We are looking into improving our file permissions support

  • User profile image
    BitCrazed

    @ankushnarula:It will be available on every Windows 10 client OS after it's released in summer 2016.

  • User profile image
    BitCrazed

    , Kevin​Trumbull wrote

    @BitCrazed:The problem with piping objects is that it's MUCH harder to figure out why things aren't working.  A systems enginner and I tried activating 10,000+ licenses on Office 365 recently (following Microsoft's guide to the letter) using PowerShell and it didn't work.  It took WAY too much time to figure out how to get this to function.

    I never have that much trouble with bash since it supports non-object-oriented linear scripts which I find tremendously easier to sequentially step through and debug.  With any *nix shell I can see the output of every command every single step of the way.  Of course this could be due to the fact that I have a background in *nix systems administration and extensive use of regular expressions and not "programming".

    Yes, this is very likely to be the "gap" for you: PowerShell script is a little different to Bash script. They're not a million miles apart syntactically, but there is a gap which is easily bridged by a little research, learning and practice.

    This will be the same for PowerShell users who may need to learn Bash - they'll miss a lot of the power of serializing objects between tools/commands and an increased reliance on sed, awk, etc., to transform streams of text between tools.

    Certainly for larger projects object oriented is the way to go, but for simple (extract info) & (execute command using info) it always seems to require more code, make things more complicated, and harder to debug.

    Another thing you'll find with PowerShell is that it appears more syntactically verbose. However, what you learn over time is that the full parameter names can often be abbreviated to just one or two characters. Also, longer command names can be aliased to abbreviated versions of your own choosing. Over time, most PowerShell users end up using highly abbreviated commands and parameters when typing commands interactively, but usually write scripts using full command and parameter names so that it's easier for others to understand what the script is doing without having to learn the original author's collection of abbreviations etc.

     

    HTH.

  • User profile image
    BitCrazed

    @Karl Botts:Cygwin is a great toolset that, because the tools are compiled to Win32 executables, integrates well with the rest of Windows.

    However, Cygwin often struggles to sufficiently mimic Linux' behavior resulting in many OSS developer tools and projects, particularly those with hard dependencies on Linux behaviors or binaries, failing to work correctly on Windows.

    This is where WSL provides value - because WSL runs unmodified Linux ELF binaries natively, within an environment that behaves just like Linux user-mode environment does, many projects that currently fail to build and/or run on Windows, work as expected when run on Bash on WSL.

    Re. PowerShell:

    PowerShell is a fabulously powerful command-line shell and toolset. It is capable of doing things that Bash is just not able to because PowerShell tools and commandlets can exchange collections and graphs of objects rather than serializing text. Also, PowerShell integrates deeply with Windows platforms and technologies, making it a very powerful tool for administering and configuring most things in the Microsoft platform & cloud ecosystem.

    While PowerShell's script is a little different from Bash script, it's not a million miles away - learning PowerShell doesn't take long if you already know Bash. PowerShell users often miss some of the capabilities of PowerShell when moving to Bash, however.

     

     

  • User profile image
    Paolo Supino

    Why Reinvent the wheel???
    Once upon a time Windows NT had a posix layer... At a certain point of the evolution of the Windows NT based operating systems it was removed. Since Linux is Posix compliant wouldn't it make more sense to bring back the Posix layer (and a lot of applications would simply work with no effort what so ever).

    Sorry guys, but I'm sticking with my Cygwin interface

  • User profile image
    technofranc​hise

    Manipulating the directories in windows in Ubuntu's like fashion is really an interesting thing

  • User profile image
    Australopit​hecus

    This is going to make life much easier. However, what is file permission going to look like? 

  • User profile image
    Australopit​hecus

    I have been looking around and get the impression that this is only being released for development purposes. Are there any plans to make this a production environment safe tool? It will be great being able to use *nix tools in development but if they cannot be safely deployed to a production environment that severely limits the scope.

  • User profile image
    esmoore

    This is amazing, thank you!!!

  • User profile image
    BitCrazed

    @Paolo: As I stated above:

    POSIX / Interix / SFU required code to be rebuilt locally in order to run. This was a challenge for systems where the source is unavailable and/or no longer builds. 

    Similarly, Cygwin's tools are compiled to Win32 executables, and so integrates well with the rest of Windows, but often struggles to sufficiently mimic Linux' behavior resulting in many OSS developer tools and projects, particularly those with hard dependencies on Linux behaviors or binaries, failing to work correctly on Windows.

    This is where WSL provides value - because WSL natively runs unmodified Linux ELF binaries , within an environment that behaves just like Linux user-mode environment does, many projects that currently fail to build and/or run on Windows, work as expected when run on Bash on WSL.

  • User profile image
    harper

    Are you sure that you are talking about a technical topic? It sounds like you want to sell a new fry pan with a softer surface.

  • User profile image
    Zorgatone

    What about POSIX-style threads and sockets?
    Would you able to use them on windows (ie. an .exe application)?

  • User profile image
    Kyle H

    How did you get fork(2) (or clone(2)) working well enough to support Linux binaries?

    I maintained a software for a decade which we were never able to fully support on Windows because CreateProcess() simply didn't meet the need of being able to atomically clone the running address space (which we needed to do object graph checkpointing and serialization). Manually walking the object graph in an atomic and consistent fashion on Windows has required pausing input processing until the walk was complete. It was simply not possible to multithread, because objects could be reattached to different points in the tree -- and the serialization loader simply refused to load any inconsistent serialization, because of consistency guarantees the entire system relied on. (As well, the system grew to include the equivalent of Python's Global Intepreter Lock, due to the lack of supportable multithreading.)

    Cygwin's frok[sic] class implemented fork() by pausing the parent process, manually walking through the allocated memory regions of the parent from the child, reallocating pages at the appropriate addresses and copying them over. This worked, but it was kludgy and I couldn't find any guarantees that the behavior it relied on wouldn't change in future versions of Windows. As such, we simply implemented compilation under Microsoft's compilers, and relegated our Windows users to second-class citizens -- particularly because we couldn't even build an NT Service wrapper around it (due to not wanting to substantially fork the code to support multithreading on Windows but not on UNIX-alike platforms), so it could only be invoked from the desktop after someone logged in. Due to its nature, though, it would best be positioned as a service.

    So, if you're in a mood to share details, I would like to know how you implemented fork(2) and clone(2) under the NT process model (which, due to CreateProcess(), mandates that no process will ever have access to any state of its parent as an implicit operation), how the memory management works, whether it properly implements shared/copy-on-write pages, the whole works. I would also very much like to know if a Linux API program can have access to the Service Control Manager. In other words, I'd like to know if you have any intent to bring the benefits of the Windows kernel and subsystem world to the Linux process model and API. That would -truly- permit a migration path from a temperamental, abusive, and sexist kernel culture.

    But, given your statement that this is positioned only as a means "for developers to be more productive on their own machines", I'm not holding out any hope. After all, what I'm asking for is outside the realm of "user interaction", it's more in the realm of "system interaction". This is why many developers prefer open-source software -- it allows us to see something that does almost what we want, and reprogram it to do the last 5%, instead of relying on how a large corporation wants to "position" the capabilities it creates. This is why so many of us have to choke down associations with undesirable communities, it's the only way that allows us to get things done without developing from scratch.

    I'd beg you to open-source the kernel driver that implements the Subsystem for Linux, like you finally open-sourced the FAT filesystem driver in the Device Developer Kit (and which ultimately spawned the Dokan and Dokan FUSE projects to implement user-mode filesystems in Windows -- do you recall NT4 when the Installable File System kit was an extra $10,000 investment and a separately executed not-available-to-vet-before-shelling-out-the-cash contract for developers?), but Microsoft has shown no interest in opening any of its kernel-level process management -- even when, as now, it benefits from the hard work of the open-source community which has been fighting against Microsoft's monolitic "we have the best way and we can't understand why you'd ever want to do anything else so we'll never support it" NT culture for the past 20+ years.

    I'm sorry that I can't choke down the bitterness, here. Microsoft has ill-served the communities that have wanted to migrate from other platforms for a long time, and it continues to do so. It has dropped technologies and left its developers in the lurch many times over its history, and it continues to do so by abandoning the support of those technologies without open-sourcing them. I wish that I could have the benefits of Windows (like real ACLs on processes instead of relying on POSIX abandoned-draft permissions, or service logins that are sane instead of relying on systemd or its predecessor of init scripts, or a more solid driver architecture) as incremental improvements to what Linux has created thus far... but I'm too afraid of Microsoft's old "embrace, extend, abandon" approach to ever be fully comfortable with it.

  • User profile image
    Tadd

    So, WINE backwards?...I begrudgingly admit this is cool.

  • User profile image
    Memory Leak

    So another "Interix" or "Posix for windows services". A bit annoying to see you two pretend like world has never seen this techonology, and apeing over it like it's best thing after sliced bread. Anyway cool that MS is getting it back. Would be even nicer if they didn't focused on a certain distro, and instead been more generic so that users themslve can configure system more fine grained (for example I prefer Arch :-)).

    Anyway, most of *nix/userspace applications this days exist natively for windows so I see no real advantage to run elf-binaries instead of native windows binaries when those exist. However in some cases where those does not exist being able to run linux binaries might be a positive thing.

  • User profile image
    Memory Leak

    How does this differ from andLinux? They have been doing similar thing since long time ago.

  • User profile image
    Alexandro

    Amazing!, an excellent idea to bring back the dev community that is fading away from Windows. I would say 10 years late, but it is better now than never.

    Great stuff!.

    Thanks..

  • User profile image
    Xap2

    OMG Awesome

  • User profile image
    Xap2

    OMG Windows is actually going cross platforms

  • User profile image
    timmykill

    Can I call this GNU/Windows?

  • User profile image
    BitCrazed

    @timmykill: That's definitely one way to think about it ;)

  • User profile image
    BitCrazed

    @Xap2: Perhaps its more accurate to say that multiple platforms now run on Windows :)

  • User profile image
    BitCrazed

    So another "Interix" or "Posix for windows services". A bit annoying to see you two pretend like world has never seen this techonology, and apeing over it like it's best thing after sliced bread.

    No, this is not like POSIX/Interix/SFU - they didn't run unmodified *NIX binaries - they required apps to be built from source. This is often an issue when one has a system but not all the code or the configuration to build it.

    Anyway cool that MS is getting it back. Would be even nicer if they didn't focused on a certain distro, and instead been more generic so that users themslve can configure system more fine grained (for example I prefer Arch :)).

    WSL has been built to be distro-agnostic, but we had to start somewhere, so we chose one of the dev community's most popular distro's, Ubuntu. We are open to exploring other distro's in the future, once we've got a really solid base and way to support multiple syscalls abstractions, etc.

    Anyway, most of *nix/userspace applications this days exist natively for windows so I see no real advantage to run elf-binaries instead of native windows binaries when those exist. However in some cases where those does not exist being able to run linux binaries might be a positive thing.

    We're deliberately focusing on developer scenarios because this is a major pain point: How do you build and test Ruby/node/Java/etc. code and/or packages that depend on Linux binaries and behaviors? And, as you recognize, how do we support Linux tools that aren't available on Windows?

    While there are plenty of advantages to enabling your project/library/tool to work well on Windows as well as *NIX, we simply can't expect all *NIX code to be ported to directly support Windows.

  • User profile image
    BitCrazed

    How did you get fork(2) (or clone(2)) working well enough to support Linux binaries?

    By implementing a new "PicoProcess" infrastructure within the Windows kernel that allows us to create secure, lightweight PicoProcesses lightning quick!


    ...

    So, if you're in a mood to share details, I would like to know how you implemented fork(2) and clone(2) under the NT process model (which, due to CreateProcess(), mandates that no process will ever have access to any state of its parent as an implicit operation), how the memory management works, whether it properly implements shared/copy-on-write pages, the whole works.

    Yes, our fork() implements true copy-on-write semantics. You think we'd half-bake this thing? ;)

    I'd beg you to open-source the kernel driver that implements the Subsystem for Linux

    No plans to do so at this time, but we have hear the frequent request.


    I'm sorry that I can't choke down the bitterness, here. Microsoft has ill-served the communities that have wanted to migrate from other platforms for a long time, and it continues to do so. It has dropped technologies and left its developers in the lurch many times over its history, and it continues to do so by abandoning the support of those technologies without open-sourcing them. I wish that I could have the benefits of Windows (like real ACLs on processes instead of relying on POSIX abandoned-draft permissions, or service logins that are sane instead of relying on systemd or its predecessor of init scripts, or a more solid driver architecture) as incremental improvements to what Linux has created thus far

    ... but I'm too afraid of Microsoft's old "embrace, extend, abandon" approach to ever be fully comfortable with it.

    In case you've not noticed, Microsoft today operates almost entirely differently to Microsoft of old, and is run by entirely different people.

  • User profile image
    psyafter

    Any chance that we can build android in Bash on Ubuntu on Windows?

  • User profile image
    galatei

    Thank you, it's much appreciated move towards linux shell. I've been running the likes of msys for the last 10 years on windows just to get my things done. Now it seems this will be easier than ever.

  • User profile image
    Vadim

    Amazing! Finally!

  • User profile image
    Guy

    Will WSL allow execution of windows binaries or is it completely segregated to Linux binaries. I.e. is it another separate environment (which for me was one of the problems with the Posix/Interix subsystems).

    I love the idea of better unix tools on Windows, I love the idea that they'll be shipped as standard, but if they end out being regulated to only allowing linux apps to interact with other linux apps then why not just run linux? If you can integrate them with Windows apps on the same box then that could be enormously compelling.

  • User profile image
    Guy

    How does file locking work? Since it's all backed by Windows, does that mean that Linux apps have to contend with file in use errors rather than being able to just write a new version of the file?

  • User profile image
    peterjones

    @Don: Best move ever on Windows

  • User profile image
    peterjones

    Thank you Microsoft for this. It is mesmerising.

  • User profile image
    turibbio

    Powershell != Bash

  • User profile image
    Ebenezer

    Nice one from microsoft .

  • User profile image
    hlava

    good job, but...case sensitiv, crlf vs lf, backslash vs slash atdatd 

  • User profile image
    Papakios​Papakis

    Thanks for the video.

    As a Linux user I'm happy to see you've inserted a generous portion of penguin inside your OS. I hope Bash shell stays for good in Windows, so that it'll make my life easier when I happen to be forced to work on your system.

    And by the way, an alternative for "clear" is CTRL+L.

    Cheers

  • User profile image
    Papakios​Papakis

    Do avoid playing around a Bash shell in root mode.

    All it takes to sack your system is

    rm -rf /

    Use sudo instead to install stuff. And always with care.

    bb

  • User profile image
    Vuckovic

    @BitCrazed Highlight of 2016! Thx for all the effort.

  • User profile image
    Kamal

    I have Windows 10 PRO with OS build 10586.218 and i don`t have in features bash for ubuntu ? Are any way to install bash unless to change to preview?

  • User profile image
    michal

    It is still impossible to install ruby on winodows bash

  • User profile image
    Anonim

    I need simple Windows for play games. Not bug not lag.Thank you

  • User profile image
    buenos

    what version of Ubuntu is being used? what if I'd like to upgrade it?

  • User profile image
    Artem Pylypchuk

    I'm surprized how he keeps typing "clear" instead of just ^L.
    My ex-manager (who was a Windows user) kept doing a similar thing on Linux PuTTY terminals - he typed "exit" instead of ^D.

    Also, on the terminal side: Have you noticed that "/dev/pts is not mounted" burp from git? They decided not to mention it.

    They're not showing anything new, similar things were done by Cygwin, but with a different approach. Similar things were done by Wine (Windows emulator) in Linux, literally decades ago.

    I wonder what would happen if they run Xming (a port of X window server for native Windows) and GUI apps from this command line to connect to that server. It should work. For comparison - Wine can run 3D apps like games or other 3D-enabled applications, MS Direct X and other stuff, there even was a start-up (can't remember its name) that helped users solve all the tricky parts for all new games.
    Things will get ugly even quicker, if one wants to use software that relies on some from the numerous Linux subsystems; for example - a web camera (v4l2) or ALSA (sound).

    I mean, thumbs up, guys. Go ahead and re-write all the Linux subsystems into the Windows kernel; shouldn't be too hard, since they are all open-source. Start from /dev/pts, obviously, because a lot of terminal software will grump about it (or refuse to run).

  • User profile image
    Maytham Fahmi

    I have been windows fan for many years because I was brainwashed and ignored Linux. Funny enough few years back when you talked to Microsoft people about thing that is not Microsoft, they said what is that? Like you guys from Microsoft hated Linux in many years and NOW?
    The past 5 years I stated using Linux beside Windows, above of that I have used also great tools like GitBash, Cmder, PuTTY and lot others. Now good late morgen, Ubunto console integrated on Windows such nuclear since. Woohaa. I am not against it and welcoming this initiative, but wake up guys.

  • User profile image
    Arek

    What is the difference between Cygwin and Windows bash? Windows shell thing is a Cygwin port - isn't it?

  • User profile image
    Froggy

    I'm working as a system administrator, and yes BASH for Windows would simplify my maintenance work in the future.
    Though my personal opinion differs, I'd rather see native DirectX for UNIX, than BASH for Windows.
    The only thing keeping me on Windows right now, are the games and the lack of driver support for UNIX.

  • User profile image
    Motoarhangel

    Русские фишку поймут Bolgenos OS :-D
    В чем составляет сложность если часть фишек с Убунту давным давно выкупили. Так сказать мягкий переход на другое ядро, типа пользователи ничего не заметят )))

  • User profile image
    Lesita

    O,now that the microsoft offically supports to install ubuntu (Linux) and not VM!

    very good!

     

  • User profile image
    Ignacio  Vazquez

    This is great ! im testing it and is working really good.
    One question, can I access to the '/' folder of linux from windows explorer for example ?
    I know that windows fs in mounted on /mnt/c for read-write, but can I do the opposite ?
    Thanks

  • User profile image
    ellorenz

    Ok, now i need to emulate mac os on windows and than my surface pro not needs else to develop on every platform :D

  • User profile image
    Paul

    This is a good step, though I would have much rather preferred
    an improved terminal. Powershell ISE is very good, but it is not a true console. Both command prompt and powershell consoles still don't have tabs. Command prompt still has the "mark to copy" feature.

    Ideally, I would want something similar to ISE that is a console. Then, if we could have some core linux commands ported like grep, sed and awk, it would be enough. Obviously, people wanting to build Linux systems would use this module or a full VM. But some of us just want more flexibility and a better terminal.

    That said, this module is a good option to have, especially if it proves capable of compiling more complex software.

  • User profile image
    Steve

    Just a heads up, this video was posted here: http://www.devnews.info/?referral=NJPOdt0zZ as part of a promo event (devs are enticed to watch the video for the chance to win something). I watched the video because it interested me, but I was sad to see that the contest button never became available. I'd suggest that someone should fix the button or take down the contest as currently it will just frustrate visitors.

  • User profile image
    Steve

    Minor correction! The main button does not work at all, however the button at the bottom of the page does work!

    http://www.devnews.info/?referral=VJDgNDIEW&refSource=copy

  • User profile image
    Dalibor

    is my perspektive step one mast woorking all from tastaure if look take from windows presered from linkus and taking butnon is nis from taking this options .
    Steps two from anohter day good luck from all from mast taking from dos and ms linkus in diferent woorking from this mast take buton from easy from tray but tray from nis from giving ctrl and one another simbols from tastaure and little little take you give buton from this maid all from if this garantitity mast woorking corecled giving your tastaure not one tastre takin nis from briging from your is woorking from all itd

  • User profile image
    jorge olguin

    @Rykel mar. 31, 2016 a las 5:32

    now, 3 onths later, after the amazing CODE world conferences, I see that comment shortsigthed.

    The direction things are going it's simply amazing.

    I praise the lord to let me live another few years, just to see where we get in the next years

  • User profile image
    jorge olguin

    Sorry...
    The conferences I meant was \\ BUILD 2016 \\

  • User profile image
    Sarcastic​Peasant

    "Rawr!!!"? Really?

    Anyway, does it support zsh? bash is so 1989 |-)

  • User profile image
    s110sunho

    I could know about this because I didn't understanded,could you speak chinese!

  • User profile image
    DwayneG

    Good One

  • User profile image
    BitCrazed

    @SarcasticPeasant:Nothing wrong with rawr! ;) And, yes, zsh works pretty well thus far :)

  • User profile image
    BitCrazed

    @Guy:Right now, Bash/WSL is a segregated environment but we are looking at smoothing-out the interop workflow in the future. 

  • User profile image
    BitCrazed

    @buenos:We only support 14.04 in this version. It's HIGHLY recommended that you do NOT upgrade to 16.04 at this time: We simply haven't had time to work on improving our WSL implementation to support the new changes in 16.04 yet.

  • User profile image
    JohnC

    PowerShell is dead as a dodo. It always was trash anyway.

  • User profile image
    nyamc

    is realy good

Add Your 2 Cents