Manually download Windows Subsystem for Linux distro packages
There are several scenarios in which you may not be able (or want) to, install WSL Linux distros via the Microsoft Store. Specifically, you may be running a Windows Server or Long-Term Servicing (LTSB/LTSC) desktop OS SKU that doesn't support Microsoft Store, or your corporate network policies and/or admins to not permit Microsoft Store usage in your environment.
In these cases, while WSL itself is available, how do you download and install Linux distros in WSL if you can't access the store?
Note: Command-line shell environments including Cmd, PowerShell, and Linux/WSL distros are not permitted to run on Windows 10 S Mode. This restriction exists in order to ensure the integrity and safety goals that S Mode delivers: Read this post for more information.
If the Microsoft Store app is not available, you can download and manually install Linux distros by clicking these links:
This will cause the
<distro>.appx packages to download to a folder of your choosing. Follow the installation instructions to install your downloaded distro(s).
Downloading distros via the command line
If you prefer, you can also download your preferred distro(s) via the command line:
Download using PowerShell
To download distros using PowerShell, use the Invoke-WebRequest cmdlet. Here's a sample instruction to download Ubuntu 16.04.
Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1604 -OutFile Ubuntu.appx -UseBasicParsing
If the download is taking a long time, turn off the progress bar by setting
$ProgressPreference = 'SilentlyContinue'
Download using curl
Windows 10 Spring 2018 Update (or later) includes the popular curl command-line utility with which you can invoke web requests (i.e. HTTP GET, POST, PUT, etc. commands) from the command line. You can use
curl.exe to download the above distros:
curl.exe -L -o ubuntu-1604.appx https://aka.ms/wsl-ubuntu-1604
In the above example,
curl.exe is executed (not just
curl) to ensure that, in PowerShell, the real curl executable is invoked, not the PowerShell curl alias for Invoke-WebRequest
curlmight be preferable if you have to invoke/script download steps using Cmd shell and/or