Windows Subsystem for Linux

From OSDev Wiki
Jump to: navigation, search

Windows Subsystem for Linux (or WSL) is an official compatibility layer of Microsoft Windows which allows Windows users to use Linux applications without virtual machines or a third-party program like Cygwin. WSL includes a Linux-compatible kernel capable of running ELF executables, along with a Bash shell and standard Linux command-line tools.

Due to the ubiquity of Linux in programming (with OS Development being no exception) and the various programs and libraries which are only designed to run on Linux machines, WSL may prove useful to any Windows-using OS developers.


Windows Subsystem for Linux is only available on 64-bit Windows 10 machines running the Anniversary Update or later (check by opening System>Settings>About).

Using Windows Subsystem for Linux

To enable Windows Subsystem for Linux, follow these steps:

  • Put your computer into Developer Mode. to do this:
    • Open settings
    • Select "System & Security"
    • Select the "For Developers" tab
    • Select the "Developer Mode" radio button
  • Enable the Windows Subsystem for Linux feature via either the GUI or the Command Line
    • GUI:
      • Open the "Turn Windows features on or off" utility (try searching for it in Start)
      • Enable "Windows Subsystem for Linux (beta)"
      • Click OK
    • Command Line:
      • Open PowerShell
      • Run
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
    • When prompted to reboot, do so.

Assuming no errors are thrown around, Windows Subsystem for Linux should now be installed. To activate bash:

  • Open a normal command prompt
  • type "bash" and hit enter
Personal tools