Partager via


Windows Subsystem for Linux Overview

We recently announced Bash on Ubuntu on Windows which enables native Linux ELF64 binaries to run on Windows via the Windows Subsystem for Linux (WSL). This subsystem was created by the Microsoft Windows Kernel team and has generated a lot of excitement. One of the most frequent question we get asked is how is this approach different from a traditional virtual machine. In this first of a series of blog posts, we will provide an overview of WSL that will answer that and other common questions. In future posts we will dive deep into the component areas introduced.  

Posted on behalf of Deepu Thomas.

History of Windows Subsystems

Since its inception, Microsoft Windows NT was designed to allow environment subsystems like Win32 to present a programmatic interface to applications without being tied to implementation details inside the kernel. This allowed the NT kernel to support POSIX, OS/2 and Win32 subsystems at its initial release.

Early subsystems were implemented as user mode modules that issued appropriate NT system calls based on the API they presented to applications for that subsystem. All applications were PE/COFF executables, a set of libraries and services to implement the subsystem API and NTDLL to perform the NT system call. When a user mode application got launched the loader invoked the right subsystem to satisfy the application dependencies based on the executable header.

Later versions of subsystems replaced the POSIX layer to provide the Subsystem for Unix-based Applications (SUA). This composed of user mode components to satisfy:

  1. Process and signal management
  2. Terminal management
  3. System service requests and inter process communication

The primary role of SUA was to encourage applications to get ported to Windows without significant rewrites. This was achieved by implementing the POSIX user mode APIs using NT constructs. Given that these components were constructed in user mode, it was difficult to have semantic and performance parity for kernel mode system calls like fork(). Because this model relied on the need for programs to be recompiled it required ongoing feature porting and was a maintenance burden.

Over time these initial subsystems were retired. However, since the Windows NT Kernel was architected to allow new subsystem environments, we were able to use the initial investments made in this area and broaden them to develop the Windows Subsystem for Linux.

Windows Subsystem for Linux

WSL is a collection of components that enables native Linux ELF64 binaries to run on Windows. It contains both user mode and kernel mode components. It is primarily comprised of:

  1. User mode session manager service that handles the Linux instance life cycle
  2. Pico provider drivers (lxss.sys, lxcore.sys) that emulate a Linux kernel by translating Linux syscalls
  3. Pico processes that host the unmodified user mode Linux (e.g. /bin/bash)

It is the space between the user mode Linux binaries and the Windows kernel components where the magic happens. By placing unmodified Linux binaries in Pico processes we enable Linux system calls to be directed into the Windows kernel. The lxss.sys and lxcore.sys drivers translate the Linux system calls into NT APIs and emulate the Linux kernel.

 

LXSS diagram

Figure 1: WSL Components

LXSS Manager Service

The LXSS Manager Service is a broker to the Linux subsystem driver and is the way Bash.exe invokes Linux binaries. The service is also used for synchronization around install and uninstall, allowing only one process to do those operations at a time and blocking Linux binaries from being launched while the operation is pending.

All Linux processes launched by a particular user go into a Linux instance. That instance is a data structure that keeps track of all LX processes, threads, and runtime state. The first time an NT process requests launching a Linux binary an instance is created.

Once the last NT client closes, the Linux instance is terminated. This includes any processes that were launched inside of the instance including daemons (e.g. the git credential cache).

Pico Process

As part of Project Drawbridge, the Windows kernel introduced the concept of Pico processes and Pico drivers. Pico processes are OS processes without the trappings of OS services associated with subystems like a Win32 Process Environment Block (PEB). Furthermore, for a Pico process, system calls and user mode exceptions are dispatched to a paired driver.

Pico processes and drivers provide the foundation for the Windows Subsystem for Linux, which runs native unmodified Linux binaries by loading executable ELF binaries into a Pico process’s address space and executes them atop a Linux-compatible layer of syscalls.

System Calls

WSL executes unmodified Linux ELF64 binaries by virtualizing a Linux kernel interface on top of the Windows NT kernel.  One of the kernel interfaces that it exposes are system calls (syscalls). A syscall is a service provided by the kernel that can be called from user mode.  Both the Linux kernel and Windows NT kernel expose several hundred syscalls to user mode, but they have different semantics and are generally not directly compatible. For example, the Linux kernel includes things like fork, open, and kill while the Windows NT kernel has the comparable NtCreateProcess, NtOpenFile, and NtTerminateProcess.

The Windows Subsystem for Linux includes kernel mode drivers (lxss.sys and lxcore.sys) that are responsible for handling Linux system call requests in coordination with the Windows NT kernel. The drivers do not contain code from the Linux kernel but are instead a clean room implementation of Linux-compatible kernel interfaces. On native Linux, when a syscall is made from a user mode executable it is handled by the Linux kernel. On WSL, when a syscall is made from the same executable the Windows NT kernel forwards the request to lxcore.sys.  Where possible, lxcore.sys translates the Linux syscall to the equivalent Windows NT call which in turn does the heavy lifting.  Where there is no reasonable mapping the Windows kernel mode driver must service the request directly.

As an example, the Linux fork() syscall has no direct equivalent call documented for Windows. When a fork system call is made to the Windows Subsystem for Linux, lxcore.sys does some of the initial work to prepare for copying the process. It then calls internal Windows NT kernel APIs to create the process with the correct semantics, and completes copying additional data for the new process.

File system

File system support in WSL was designed to meet two goals.

  1. Provide an environment that supports the full fidelity of Linux file systems
  2. Allow interoperability with drives and files in Windows

The Windows Subsystem for Linux provides virtual file system support similar to the real Linux kernel. Two file systems are used to provide access to files on the users system: VolFs and DriveFs.

VolFs

VolFs is a file system that provides full support for Linux file system features, including:

  • Linux permissions that can be modified through operations such as chmod and chroot
  • Symbolic links to other files
  • File names with characters that are not normally legal in Windows file names
  • Case sensitivity

Directories containing the Linux system, application files (/etc, /bin, /usr, etc.), and users Linux home folder, all use VolFs.

Interoperability between Windows applications and files in VolFs is not supported.

DriveFs

DriveFs is the file system used for interoperability with Windows. It requires all files names to be legal Windows file names, uses Windows security, and does not support all the features of Linux file systems. Files are case sensitive and users cannot create files whose names differ only by case.

All fixed Windows volumes are mounted under /mnt/c, /mnt/d, etc., using DriveFs. This is where users can access all Windows files. This allows users to edit files with their favorite Windows editors such as Visual Studio Code, and manipulate them with open source tools in Bash using WSL at the same time.

 

In future blog posts we will provide additional information on the inner workings of these component areas. The next post will cover more details on the Pico Process which is a foundational building block of WSL.

 

Deepu Thomas and Seth Juarez discuss the underlying architecture that enables the Windows Subsystem for Linux.

Comments

  • Anonymous
    April 22, 2016
    Is VolFS based on any existing linux filesystem like ext4 or btrfs? Is it possible to mount an ext4 file system under WSL?
    • Anonymous
      April 24, 2016
      No. Think of VolFS as a layer that provides Linux file system semantics on top of NTFS. Today we auto mount only fixed NTFS drives.
      • Anonymous
        April 25, 2016
        Is it possible to mount a pendrive or other removable storage device using mount command?
        • Anonymous
          November 27, 2016
          #! /bin/bashMOUNT_POINT=./mountUSB_DISK_MAJOR=bUSB_DISK_MINOR=1if [ $(whoami) == "root" ] ; then if [ ! -e $MOUNT_POINT ] ; then mkdir $MOUNT_POINT fi sudo mount /dev/sd"$USB_DISK_MAJOR""$USB_DISK_MINOR" $MOUNT_POINT # /dev/sda is your root device, if you only have one disk drive in your machine, with /dev/sda1 refering to partion 1 on your disk drive #with this in mind, if you have only one disk drive in your machine, and you plug in a working, partitioned usb disk drive, with 2 paritions, you can run the command ls /dev/sd*. you should then see, a list displayed from your terminal the looks like "/dev/sda /dev/sda1 /dev/sda2 /dev/sda3 /dev/sdb /dev/sdb1 /dev/sdb2". your usb disk drive will be /dev/sdb, where /dev/sdb1 will be the first partition, and likewise, /dev/sdb2 will be the second partition on the disk.else echo "You must be root, or Sudo"fi## by the time that I wrote this, I came to my senses, and realized that the question asked was not directed for a baremetal linux os. Whoops! maybe some will find this useful anyways.
  • Anonymous
    April 22, 2016
    "Files are case sensitive and users cannot create files whose names differ only by case."What does this mean? Will programs whose builds use "Makefile" and "makefile" to cater for different kinds of make break? Will archives containing such files unpack successfully? If users can't make files like "File" and "file", then why bother with case sensitive files?
    • Anonymous
      April 22, 2016
      @JohnF, that sentence is describing the Windows(-like) file system. There you can't have both Makefile and makefile. On Linux and VolFS you can.
    • Anonymous
      April 22, 2016
      DriveFs looks like just a thin wrapper around NTFS, so it has the same features/limitations (e.g. case preserving but non-sensitive).If you try to build Linux apps under shared drives (/mnt/c etc) you'll have issues.If you use those in VolFs areas (/bin, /usr/, /etc, /home) it works fine as those have extra stuff behind the scenes to track and map the POSIX stuff over.From the looks of it VolFs is in the AppData part of your user account, and while the files are there I'm guessing there's a secondary store somewhere tracking the non-NTFS stuff.
    • Anonymous
      April 22, 2016
      Default Windows policy. May be overridden to full case sensitivity system-wide by registry, however losing compatibility with some Win32 applications.
    • Anonymous
      April 23, 2016
      I believe that's meant to be "Files aren't case sensitive". You can for example use `cd /mnt/c/users/jessica/documents' and it will open C:\Users\Jessica\Documents. Note the difference in case. There is a UserVoice request to have this behaviour changed, that people can vote on! Please vote if you can!!See https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/13375260-bashonwindows-must-support-a-case-sensitive-file-s
    • Anonymous
      April 23, 2016
      > What does this mean? Will programs whose builds use “Makefile” and “makefile” to cater for different kinds of make break? Will archives containing such files unpack successfully? If users can’t make files like “File” and “file”, then why bother with case sensitive files?I suspect that they meant case-preserving, case-insensitive, like the rest of Windows. If they do mean case-sensitive, then the restriction is most likely so that files made from this subsystem still plays nice with the rest of Windows.Windows' filesystem handling makes all filesystem access case insensitive (but case preserving, as NTFS itself has no issues with case sensitivity). This behaviour is old, and most likely only there for compatibility.If they bypassed this in DriveFs, and let you create a Makefile and makefile side by side, then things like Explorer.exe would most likely break if you accessed that directory, as the regular API's would consider those two files to be the same. You're not sure which you would get a hold of if you tried to open one.(I would argue that case insensitivity is a very bad idea, and only in place to allow software that is poorly written with inconsistent casing to run, but that's a discussion for another day.)
    • Anonymous
      April 23, 2016
      He probably meant case-preserving, like NTFS, not case-sensitive.
    • Anonymous
      April 23, 2016
      This would cause an issue if you tried to do this on the mounted Windows drive (iirc at /mnt/c). However, for most purposes, you will want to work in a directory which is using VoIFs, not DriveFs, in which case everything will work as expected. The reason for this is that DriveFs manipulates a Windows filesystem, and since Windows does not permit files which only differ in case, allowing that on the Linux side would make all sorts of things potentially misbehave when accessing that directory from windows.
    • Anonymous
      April 23, 2016
      I would imagine that it would take more than a subsystem and a cleanroom kernel environment to allow illegal filenames in a drivefs directory. That's what volfs is for.
    • Anonymous
      April 23, 2016
      Thank you all for informative and helpful answers. Case preserving makes a lot more sense.
    • Anonymous
      April 24, 2016
      When DriveFS was initially designed we wanted to adhere to default Win32 behavior which is case preserving but case insensitive. Based on feedback from users who want to git clone/npm install to DriveFs locations we are looking into how we can bring more VolFs like behavior (symlinks, case sensitive files etc) to DriveFs in future builds.
    • Anonymous
      April 25, 2016
      NTFS is case preserving but not case sensitive. This is a pain. :)
      • Anonymous
        May 13, 2016
        The problem isn't NTFS. NTFS has no problem with most linux filesystem behavior. The problem is with windows, which keeps a lot of what one might call "windows 95" behavior to make sure older programs don't break. The same sort of issue applies to maximum path length. The old limit of ~250 characters is not imposed by NTFS, and there are some api calls available now (but apparently not used by the lxss developers) that don't impose that limit. But lots of other windows programs (apparently including Explorer) don't know how to handle them. If you make a bunch of files in a DriveFS filesystem, you might expect to use them at some point with Windows applications; but if they rely on paths longer than the "old" limit, or case sensitivity, and windows couldn't deal with them (e.g. backup programs, let alone Explorer or productivity or developer tools) you might not be happy. At the same time, the VolFS filesystem is advertised as not supporting interaction with Windows, so perhaps those limitations can be removed completely there?I'd hope for two things: first, the ability to install the VolFS filesystem (or perhaps another VolFS filesystem, or even a volume formatted with a traditional Linux filesystem?) somewhere other than the %profile% on the system drive, which seems to never have enough storage space; and for the lxss developers to get the DriveFS filesystem as usable as possible by both environments. Cygwin, SMB, virtual machine technologies (sharing "host" storage with "guest" machines), and windows drivers for ext2, have been coming up with compromises in these areas for quite a while now. I'd hope the WSL release would take the best from what those folks have learned over the years, instead of trying to reinvent the wheel.
    • Anonymous
      June 16, 2016
      That seems a spelling error and I guess should read "Files are case insensitive"
    • Anonymous
      December 24, 2017
      That's correct, you cannot have both filenames in the same directory, and note MacOS has the same restriction. Many wares are un-effected, others must be 'ported'. You can run Qemu or Bochs or Virtualbox.
  • Anonymous
    April 22, 2016
    The comment has been removed
    • Anonymous
      November 25, 2016
      Nah, I have just installed docker-engine successfully, but it is unable to start. I doubt NT Kernel implements LXC, has support CoW FS, or has support for networking at level required for Docker.
    • Anonymous
      December 24, 2017
      No. Virtualbox or Bochs can emulate hardware, 'lxrun' kits do not - they only emulate kernel calls and not all of them. The problem with Linux is poor hardware support and poor leverage* of the support it has. (* ex: driver has all features of hw enabled and software exists to expose it to end user and applications too *) The other problem is Linux OS distros tend to better support hardware that dis-includes USA products such as Windows 10, Apple iOS, features of Intel processors. Never assume there are no tech wars going on.
  • Anonymous
    April 22, 2016
    The comment has been removed
  • Anonymous
    April 22, 2016
    Thank you for sharing this information to make it Clear ;-)
  • Anonymous
    April 23, 2016
    Very interesting, thanks for the talk. The pico-process details will be very enlightening and help round-out the information, I'm sure.How does starting bash start the session manager (which winds up starting the Linux instance, which winds-up loading /bin/bash)? Can you elucidate that chain of events?Perhaps I should wait for the pico-process talk to be put online, but: What are the mechanics of requests flowing from the pico-process to LXCore/LXSS? Linux syscalls use syscall/sysenter, just like Windows. Does the pico-process TEB just point to a different system service table, and support for this table is what's provided by the "pico-provider drivers"?
    • Anonymous
      April 24, 2016
      The session manager service is trigger started when bash invokes session manager service APIs. You can find more details around trigger started services here https://msdn.microsoft.com/en-us/library/windows/desktop/dd405513(v=vs.85).aspxPico processes don't have traditional Win32 equivalents like TEB but the NT kernel knows that for sysenter dispatches for pico processes it should invoke the corresponding pico provider driver.
  • Anonymous
    April 23, 2016
    What about networking? Has WSL feature-parity with Linux regarding sockets and such?
  • Anonymous
    April 23, 2016
    I'm curious: are there any plans to support additional subsystems, e.G. audio (ALSA) or video (V4L2)?
  • Anonymous
    April 23, 2016
    Nice writeup, I look forward to people doing iteresting things with this and finding edge cases.Is there somewhere that people can report bugs / ask for features ?
  • Anonymous
    April 23, 2016
    How does the fork()/clone() implementation work under the hood? Does it have the lightweight map-all-pages/copy-on-write semantic, or does it have the heavyweight copy-all-pages semantic that original UNIX had?
    • Anonymous
      April 26, 2016
      We will get into more details around our fork implementation in later posts but yes we do support copy on write.
  • Anonymous
    April 23, 2016
    Is it correct to assume WSL don't implement the copy-on-write semantics of fork and just copies everything at fork?
  • Anonymous
    April 24, 2016
    Fantastic presentation, very excited for this series of blog posts!
  • Anonymous
    April 24, 2016
    Awesome! But...I ran into a 248 char path limit of windows several a few times. Is that solved?
    • Anonymous
      May 13, 2016
      The limit is not there because of NTFS, it is there in the traditional Windows APIs to keep compatibility with older Windows. In fact, developers can now bypass that limit (though not without risking incompatibility with other Windows programs that still expect or impose the limit).
  • Anonymous
    April 25, 2016
    Thanks for providing more details. I wondered how the previous work fitted in.So one issue I have found ad a developer Windows is NTFS is very slow when operation on lots of small files such as a large build. Doesn't the extra layer of mapping make this even worse?
    • Anonymous
      April 25, 2016
      IIRC, MS actually run some linux servers in their data center because of performance issues of NTFS
  • Anonymous
    April 25, 2016
    So, why not https://github.com/wishstudio/flinux ?
    • Anonymous
      April 25, 2016
      I'm not a lawyer, but according to https://github.com/wishstudio/flinux/blob/master/LICENSE is GPL3 - which would put limit to its use (I'm not for, or against GPL3, I'm simply pointing out, that certain projects would be discarded for certian use just because of their LICENSE)
  • Anonymous
    April 25, 2016
    If metadata related access is stored as extended properties in NTFS and NT does not understand them in world of windows, how the access is maintained? example if I create a file using bash and assign read only attribute, will it be read only for windows? if I go to windows explorer? same way, if I create a file using windows, and mark it say read only, will it be read only for bash for linux on windows!!!?
  • Anonymous
    April 25, 2016
    Thanks for the talk. Just wondering... you're storing VoIFs metadata (POSIX-style permissions, owner, etc.) as NTFS extended attributes ("LXATTRB"). Why did you choose EA instead of alternate data streams?
    • Anonymous
      April 26, 2016
      We wanted to avoid opening extra handles and EAs helped us there.
  • Anonymous
    April 25, 2016
    The comment has been removed
  • Anonymous
    April 25, 2016
    I want it, I want to install it right now. :)
  • Anonymous
    April 25, 2016
    Is it possible to mount Linux regular ext4 partitions using the Windows Subsystem for Linux? And would the filesystem tools like chown and chmod work on the files within it?
  • Anonymous
    April 25, 2016
    Make that video work with html5, and I'll watch it.
  • Anonymous
    April 25, 2016
    Can you please tell us if this is the equivalent in what wine is in linux?Wine susposed do the "same" but in Linux for Windows Apps :) So WSL is like that? Its 100% native way to run linux binaries on windows?
  • Anonymous
    April 26, 2016
    Did'nt they have 1 of those for free awhile bake called lidows,freespire and wine or something like that .You would'nt have to have MS OS and it was a linux OS that was compatible with MS
  • Anonymous
    April 26, 2016
    Does either volfs or drivefs provides Linix-like behaviour for open files? For example can I delete a file which is used by another process?
    • Anonymous
      April 26, 2016
      That is only VolFs, DriveFs follows the same windows semantics for deletion.
  • Anonymous
    April 26, 2016
    You are getting benefits on Open Source making any POXIS app to run, ¿When you will do the same for Linux?
    • Anonymous
      April 29, 2016
      i think they will not do such of thing.. Wine struggles do the same without any help from Microsoft (how much good that was, if ms help wine to make more quick steps...). Is only one way i think :p Is not philanthropist foundation (ms), they will only take from Open Source, not give back :P
  • Anonymous
    April 26, 2016
    We have seen people asking if WSL will be made available on Windows 8.1, since that kernel is still in full support. Will it appear in the store for them as well eventually?
  • Anonymous
    April 28, 2016
    So if the root fs is VoIF, the "mountpoints" for the Windows is "DriveFs"... what about UNCs?... would one go via Windows inbuilt support, or use mount.cifs from Ubuntu userspace?When you think about it, this is kinda like WINE in reverse :)
  • Anonymous
    April 28, 2016
    What about /dev, /sys and /proc? Will VolFs have support for those? For example, if I want to use minicom on /dev/tty0, will that work? And will cat /proc/1/status work?
  • Anonymous
    April 30, 2016
    Very nice post about linux subsystem. Today linux environment is using and orchestrating solutions with containers, like docker. There is a lot of environments using kubernetes, mesos and similar softwares to auto scale container environments. Now I see microsoft going into this game. I don't see any restriction to Microsoft start many linux system and run dockers images directly. May be necessary implement some extra api (cgroup) but I think that in near future we will se Windows running docker images.In fact , some time ago I heard microsoft interacting with docker team, and I think that the first result of this interaction is this linux subsystem. Congratulations
  • Anonymous
    May 04, 2016
    So how's the security scan work with launching Linux binaries?
  • Anonymous
    May 05, 2016
    wow,add sudo apt-get and packman
  • Anonymous
    May 05, 2016
    I've turned my back on Windows after the 2000 version. I never looked back so far. My wife's new convertible with Windows 10 is quick and shows touch integration that no Linux can match. And now I can bring all the tools that I love to use, and even install plain apt packages? I'm tempted to give it a try, and that's huge change.
  • Anonymous
    May 09, 2016
    The comment has been removed
  • Anonymous
    May 10, 2016
    The comment has been removed
  • Anonymous
    May 10, 2016
    Symbolic links is what's stopping me from using this. In order to use windows app (editors, IDEs) we need to have our workspaces in /mnt/. But this is preventing me from being able to npm install anything on /mnt/ because of the symlink requirement.
  • Anonymous
    May 11, 2016
    The comment has been removed
  • Anonymous
    May 12, 2016
    Sweet, Bash on Windows... Cool seeing you Seth, remember Holmans NV tech dept?
  • Anonymous
    May 13, 2016
    Hello.We are developing Python IDE (PyCharm) and we need some way to launch python in WSL. I have several ideas, but all of them look hackerish. What is the best way to do that?* Ideally I would like to do "bash.exe -c ..", but I can't since piping does not work.* I can use ssh, I even was able to launch sshd (with password-based (interactive) auth) but sshd support seems to be buggy (try to launch it and connect with, say, putty).* It would be ineteresting to launch Pico process directly, and there are some functions (starting with "Psp"), but they are not public, are they?* I can launch bash on console and connect to this console and use ConsoleAPI, but not sure if it may work.* I can run python and send its output to network (using nc for example) but it does not look good, anyway.* "CreateProcess" does not work with ELFs (only PE/COFF are supported, I believe)So, what is the best way to achieve it? How can I launch WSL python from my Windows app and read its output interactively?
  • Anonymous
    May 13, 2016
    "... operations such as chmod and chroot"You probably meant chmod and chown.
  • Anonymous
    May 17, 2016
    I have one question :) i have not find at good quality informations about it searching on the internet, so i give me shot here :)Windows Subsystem for Linux (WSL) can be used with the upcoming Windows Server 2016? It is running right now with the technical previews? There is your plan include that functionality to the Windows Server? (it makes sense that in Windows Server. A lot of developers and companies use Windows Server for development, servicing, etc. WSL is for development purposes so thats why i find it could fit in Windows Server)Im trying to find any infos about those things on internet, but i have not any luck yet :)
    • Anonymous
      July 17, 2016
      I would agree to know more about this too.
    • Anonymous
      October 07, 2016
      Sorry - no plans to ship WSL on Windows Server right now. We have had several requests to do so, but we've got a ton of engineering to do before we can consider adding to the Server SKU's.Like you, I used to run Server for almost all my dev machines & laptops, but I've not needed to do so since Hyper-V was added to the Client SKU's. YMMV.
      • Anonymous
        November 07, 2016
        So if I want to investigate log files with tail command I have to use Cygwin or Services for Unix (SUA/SFU - if I have previous versions of system 2003-1012), but WSL is useless... shame.
      • Anonymous
        December 12, 2016
        So, you're saying that you guys have made a decent underlying server-system for Windows and haven't implimented it in the Server edition of Windows?I really don't get you guys...
        • Anonymous
          April 21, 2017
          Seriously don't understand why this was left out of Server 2016. Configuring remote resources via RDP is a nightmare.
          • Anonymous
            May 15, 2017
            I agree with you!
          • Anonymous
            May 18, 2017
            Same, it would be awesome to have on Server for interfacing with scientific applications. Cygwin no more!
  • Anonymous
    June 03, 2016
    Hey when there is a Linux bash command for Windows 10 why don't you provide to all the versions of Windows 10 ? Is it particular that it works under that environment ?
    • Anonymous
      October 07, 2016
      Bash/WSL is available on all x64 Win10 Client SKU's from Win10 Anniversary Update onwards.
  • Anonymous
    June 06, 2016
    How do I mount a network drive to the Linux subsystem? Using windows I can see V:\ without problems. Once I enter bash I cannot see it, how can I mount /mnt/v so that it points to the drive that I see in windows as V:\ ?
    • Anonymous
      October 07, 2016
      We only "mount" fixed drives at this time. USB/removable/network drives are not handled at this time. This capability is on our backlog, but it's not on the cards anytime soon.
  • Anonymous
    June 06, 2016
    C:\Users\zhaoxuji>bash错误: 0x80070490
  • Anonymous
    August 04, 2016
    The comment has been removed
  • Anonymous
    August 10, 2016
    great
  • Anonymous
    August 29, 2016
    I'm learning how to build an OS kernel and I want to run my .iso file with qemu-system-x86_64 -cdrom os.isoI receive the following error: "Could not initialize SDL(No available video device) - exiting"I'm reading that perhaps my system can't find an X11 driver, although I haven't had success yet with installing that.Any ideas on where I may look for answers? Thank you.
  • Anonymous
    September 22, 2016
    Well, this feature is nice, but what is a point? I don't believe that all nice Linux kernel features will be implemented and some features, that are emulated (like fork call) could cause a performance bottleneck, because it's expected to be fast. I doubt that docker would be able to run on Windows natively soon and I doubt that anyone even need this. It's definetely wouldn't be used by anyone for production, since we already have Linux, that is already good in running Linux applications. It's useless for casual Windows user since most of the Linux software is Open Source and most of it is already crossplatform. I don't understand why Microsoft even put any effort in it? It would probably die in a few years like Windows Subsystem For Unix or however that thing was called.
    • Anonymous
      September 25, 2016
      At my work we build programs for MacOSX, Linux and Windows. If we could reduce the number of operating system we support that would be a free lunch for us in terms of productivity. The Linux version of our programs appear to run at native speed compared to a Linux PC. The implementation of the fork() call also seems to work well in our programs running on WSL. If we don't need to maintain to ways of doing multiprocessing this would be a clear benefit for us.
    • Anonymous
      October 03, 2016
      Thanks for trying out WSL and providing feedback. If you ran any benchmarks to understand the performance difference between WSL and native Linux, please share the results out. Meanwhile, http://www.phoronix.com/scan.php?page=article&item=windows-10-lxcore&num=1 is a detailed report on performance ran by an independent entity. Here is another one by a Canonical developer https://www.linux.com/learn/howdy-ubuntu-windows-how-fast-it. Also, just to let you know, 'fork' is not emulated but built on real fork support from the NT kernel. For more details on that, you can see https://blogs.msdn.microsoft.com/wsl/2016/06/08/wsl-system-calls/ . We are aware of some performance bottlenecks around the disk side and we are actively working on it. I also would like to encourage you to read the different blog posts here https://blogs.msdn.microsoft.com/wsl that go into various technical details around the technology. Lastly, we invite you to try, test and play with the technology and share with us any real numbers around performance that you are seeing and how you would like us to improve the technology.
  • Anonymous
    September 28, 2016
    when are you planning to make WSL available for Windows 10 Enterprise?
    • Anonymous
      October 07, 2016
      It already is in Win10 Enterprise, from Win10 Enterprise Anniversary Update release.
  • Anonymous
    October 11, 2016
    It's a Linux subsystem for Windows not the other way round geez /facepalm
    • Anonymous
      May 14, 2017
      I know, right?
  • Anonymous
    October 26, 2016
    Is there some reason that an ELF loader for Windows was not implemented, and that a special "pico-process" loader must be created for every Linux executable? Presumably this exists, like many of the other arbitrary limitations, to prevent integration and interoperability with the Windows host?One has to question the usefulness of a subsystem that blocks interoperability with the host at every turn.No arbitrary binariesNo host integrationNo socketsNo servicesWhat can one actually do with WSL? Is there a single substantial Unix application that can run in this environment or is it intended only for running shells and the GNU core utilities?
  • Anonymous
    October 28, 2016
    does this mean I can run Linux video files on my pavilion with no repercussion to my system and or video files.?
    • Anonymous
      October 31, 2016
      I'm not sure what you mean by Linux video files. Do you mean a specific file format?
  • Anonymous
    November 08, 2016
    It is very disappointing that Microsoft did not include the Windows Subsystem for Linux in Windows Server 2016. I am back to install Cygwin instead of the fantastic Ubuntu for Windows. How many times Microsoft disappoints people like me? Every other day. They do not understand that we live in both worlds, and wish to unify them.
    • Anonymous
      November 08, 2016
      Thanks for your comment. I was not involved in this decision but I can speak to the rationale behind it. Since WSL is still in beta it probably isn't the best fit for an enterprise / datacenter focused SKU. As WSL becomes more complete I suspect this decision will be revisited.
      • Anonymous
        April 02, 2017
        It is up to us as the administrators to decide if a product is appropriate for production or not. Surely Microsoft knew there would be demand for WSL on 2016. To cover their posteriors, all Microsoft need to have done was have a BIG DISCLAIMER that WSL isn't ready for production and will not be supported. One of the great advantages of the majority of open source projects is that they treat us as responsible entities and offer up their projects before they are "production ready. " This is one of the best ways to get feedback from their potential user community.
      • Anonymous
        May 14, 2017
        That is why we use words like "Beta"!
  • Anonymous
    January 23, 2017
    Does this work for Redhat/CentOS? IF so 6.x or 7.x2007-2008 I remember WSL by Microsoft Research. Is this the same? I remember Microsoft winning the Linux World award running apps faster on WSL(2007-2008).
  • Anonymous
    January 25, 2017
    Great stuff. I've been working with it this week and can see this as an alternative to dual-boot machines we have now throughout the university. I have run into one issue, however. After sysprep and during OSD (using SCCM), I get 80070005 failure during applying image step. It has issues with permissions on some files in the lxss folder. Is there any way to include the already-configured WSL setup on an image? What is the preferred/planned deployment method?
  • Anonymous
    January 25, 2017
    I wanted to put lxss onto my school computer that I bought because it uses emmc and has limited space and all I need is bash, but microshaft winblows strikes again! You have to pay $100 to upgrade from windows 10 home to windows 10 pro, just to use bash as a developer; that is what upsets me Linux is free, there is no reason you should have to pay for it whatsoever if you already have a copy of windows 10, if they are going to implement it they should, period!
    • Anonymous
      January 26, 2017
      WSL is available on all client versions of Windows 10.
  • Anonymous
    February 23, 2017
    How to install Hadoop in WSL?
  • Anonymous
    March 13, 2017
    This is not available on my Windows Home Edition Build 15055. I turned on the developer options but there is nothing under features but a bunch of fonts
    • Anonymous
      March 13, 2017
      WSL is only available on client versions of the Windows Anniversary Update and the upcoming Creator's Update.
      • Anonymous
        May 14, 2017
        Really strange names you're giving your service packs nowadays ...
        • Anonymous
          May 17, 2017
          ¯_(ツ)_/¯
  • Anonymous
    April 09, 2017
    The comment has been removed
  • Anonymous
    May 21, 2017
    Hello, I have a few questions.Would it be possible in the future for windows programs, such as IDEs, to run Linux programs installed in WLS.For example, lets say my IDE requires node and I have it installed on WSL, it would be nice for the IDE to be able to use the node in WLS so I don't have to install node for windows.Since, WSL and windows are now interoperable having windows application silently use compatible Linux programs like node or git would be really great and eliminate the need to download separate versions of the programs for windows.Thanks.
  • Anonymous
    June 05, 2017
    The comment has been removed
  • Anonymous
    July 20, 2017
    When do we have GUI support in WSL without Xserver?
  • Anonymous
    August 17, 2017
    I am still waiting for the oposite to happen also. Running Windows applications in a Linux system. Is there any information about that? A bilateral compatibility would be great...
    • Anonymous
      September 21, 2017
      We've got nothing planned to enable this scenario, though it is possible to build programs that run almost/entirely unchanged on both Windows and Linux using .NET Core, Python, Java, Ruby, etc.
  • Anonymous
    August 20, 2017
    When using WSL, is it possible to call Linux .so (shared library) functions from a Win10 DLL ? If not, what is the recommended way to communicate at function call level ?
    • Anonymous
      September 21, 2017
      No, you can't call functions in Linux .so's from Windows, nor can you call functions exported from Windows DLLs from Linux binaries: Windows & Linux binaries differ in calling convention and operational behaviors (e.g. handle memory layout differently).
  • Anonymous
    September 23, 2018
    I'm late coming to this WSL party but that was a very informative vid, many thanks
  • Anonymous
    February 13, 2019
    agario unblocked thank you good post.