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
Enable the "Windows Subsystem for Linux" optional feature and reboot.
Open PowerShell as Administrator and run:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Restart your computer when prompted.
Install a Linux distribution
Download the appx for your favorite Linux distribution.
Here are links directly to the apps available through the store:
You can download the distributions to Windows Server with
Invoke-WebRequestcmdlet. Here's a sample instruction to download Ubuntu.
Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1604 -OutFile ~/Ubuntu.zip -UseBasicParsing
If the download is taking a long time, turn off the progress bar by setting
$ProgressPreference = 'SilentlyContinue'
Unzip the file
Expand-Archive ~/Ubuntu.zip ~/Ubuntu
Make sure your target directory (
~/Ubuntuin this example) is on your system drive. Usually this is your C: drive.
The contents should look like this:
Run the installer, named
Troubleshooting: Installation failed with error 0x8007007e
This error occurs when your system doesn't support WSL. Make sure that:
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..
Run distro's preferred update/upgrade.
sudo apt-get update sudo apt-get upgrade
You're done! Go use your new Linux environment!