Windows Server Installation Guide

Applies to Windows Server 2019 and later

At //Build2017, Microsoft announced that Windows Subsystem for Linux will be available on Windows Server. These instructions walk through running the Windows Subsystem for Linux on Windows Server 1709 and later.

Enable the Windows Subsystem for Linux (WSL)

Before you can run Linux distros on Windows, you must enable the "Windows Subsystem for Linux" optional feature and reboot.

  1. Open PowerShell as Administrator and run:

    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
  2. Restart your computer when prompted. This reboot is required in order to ensure that WSL can initiate a trusted execution environment.

Download a Linux distro

Follow these instructions to download your favorite Linux distribution.

Extract and install a Linux distro

Now that you've downloaded a distro, extract its contents and manually install the distro:

  1. Extract the <distro>.appx package's contents, e.g. using PowerShell:

    Rename-Item ./Ubuntu.appx ./
    Expand-Archive ./ ./Ubuntu
  2. Run the distro launcher To complete installation, run the distro launcher application in the target folder, named <distro>.exe. For example: ubuntu.exe, etc.

    Expanded Ubuntu distro on Windows Server


    • Installation failed with error 0x8007007e: This error occurs when your system doesn't support WSL. Make sure that:
  3. Add your distro path to the Windows environment PATH (C:\Users\Administrator\Ubuntu in this example), e.g. using Powershell:

    $userenv = [System.Environment]::GetEnvironmentVariable("Path", "User")
    [System.Environment]::SetEnvironmentVariable("PATH", $userenv + ";C:\Users\Administrator\Ubuntu", "User")

    You can now launch your distro from any path by typing <distro>.exe. For example: ubuntu.exe

Now that your Linux distro is installed, you must initialize your new distro instance before using your distro.