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 (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:
- Ubuntu 20.04
- Ubuntu 20.04 ARM
- Ubuntu 18.04
- Ubuntu 18.04 ARM
- Ubuntu 16.04
- Debian GNU/Linux
- Kali Linux
- SUSE Linux Enterprise Server 12
- SUSE Linux Enterprise Server 15 SP2
- openSUSE Leap 15.2
- Fedora Remix for WSL
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
Installing your distro
If you're using Windows 10 you can install your distro with PowerShell. Simply navigate to folder containing the distro downloaded from above, and in that directory run the following command where
app_name is the name of your distro .appx file.
If you are using Windows server, or run into problems running the command above you can find the alternate install instructions on the Windows Server documentation page to install the
.appx file by changing it to a zip file.