Table of contents

Windows Server 2016 Installation Guide

Sarah Cooley|Last Updated: 8/8/2017

At //Build2017, Microsoft announced that Windows Subsystem for Linux will be available on Windows Server. These instructions help you become a Windows Insider, download Windows Server, and get Linux running on the Windows Subsystem for Linux.

Prerequisites

Windows Server 2016 (build 16215+). Right now, that means a Windows Insider's build.

Already have Windows Server preview? Skip ahead.

Join Windows Insiders and Download Windows Server

  1. Join a Windows Insiders program:

  2. Download Windows Server 2016 - Insider Preview.
    Make sure you're logged in, images are only available to Windows Insiders.

Set up Windows Server

Now that you have a Windows Server image (.iso), install Windows Server on a physical computer or a virtual machine. I'm going to use a virtual machine on Hyper-V.

Here are instructions for enabling Hyper-V and creating a new virtual machine from an .iso.

During installation, Windows Server will ask for a product key. The following keys are available for unlimited activations of Windows Server (pre-release builds only). These keys may be used throughout the pre-release cycle. Read more here.

  • Server Datacenter Core: B69WH-PRNHK-BXVK3-P9XF7-XD84W
  • Server Standard Core: V6N4W-86M3X-J77X3-JF6XW-D9PRV

When you're done, you should see something like this:

Check your build number

To find your Windows Server build number, run the following in PowerShell:

systeminfo | Select-String "^OS Name","^OS Version"

You can also confirm that your build has the Windows Subsystem for Linux by running the following in PowerShell:

PowerShell
Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

Enable the Windows Subsystem for Linux

Enable the "Windows Subsystem for Linux" optional feature and reboot.

  1. Open PowerShell as Administrator and run:

    PowerShell
    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
    
  2. Restart your computer when prompted.

Install a Linux distribution

  1. Download the appx for your favorite Linux distribution.
    Here are links directly to the apps available through the store:

    • Ubuntu
    • OpenSUSE
    • SLES

      You can download the distributions to Windows Server with Invoke-WebRequest cmdlet. Here's a sample instruction to download OpenSUSE.

      PowerShell
      Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1604 -OutFile ~/Ubuntu.zip -UseBasicParsing
      

      Tip: If the download is taking a long time, turn off the progress bar by setting $ProgressPreference = 'SilentlyContinue'

  2. Unzip the file

    Expand-Archive ~/Ubuntu.zip ~/Ubuntu
    

    Make sure your target directory (~/Ubuntu in this example) is on your system drive. Usually this is your C: drive.
    Example: C:\Distros\Ubuntu

    The contents should look like this:

  3. Run the installer, named <distro>.exe
    For example: ubuntu.exe, fedora.exe, etc.

    Troubleshooting: Installation failed with error 0x8007007e
    This error occurs when your system doesn't support Linux from the store. Make sure that:

  4. Create a UNIX user

    The first time you install the Windows Subsystem for Linux, you will be prompted to create a UNIX username and password.

    This UNIX username and password can be different from, and has no relationship to, your Windows username and password. Learn more about your UNIX account..

  5. Run distro's preferred update/upgrade.

    sudo apt-get update
    sudo apt-get upgrade
    

You're done! Go use your new Linux environment!

© 2017 Microsoft