TVT618

Manually download Windows Subsystem for Linux distro package

Aug 30th, 2018
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.67 KB | None | 0 0
  1. There are several scenarios in which you may not be able (or want) to, install WSL Linux distros via the Windows Store. Specifically, you may be running a Windows Server or Long-Term Servicing (LTSB/LTSC) desktop OS SKU that doesn't support Windows Store, or your corporate network policies and/or admins to not permit Windows Store usage in your environment.
  2.  
  3. 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?
  4.  
  5. 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.
  6.  
  7. Downloading distros
  8. If the Windows Store app is not available, you can download and manually install Linux distros by clicking these links:
  9. * Ubuntu 18.04 and Ubuntu 18.04 ARM
  10. * Ubuntu 16.04
  11. * Debian GNU/Linux
  12. * Kali Linux
  13. * OpenSUSE
  14. * SLES
  15.  
  16. 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).
  17.  
  18. Downloading distros via the Command-Line
  19. If you prefer, you can also download your preferred distro(s) via the Command-Line:
  20.  
  21. Download using PowerShell
  22. To download distros using PowerShell, use the Invoke-WebRequest cmdlet. Here's a sample instruction to download Ubuntu 16.04.
  23. Enter this following command:
  24. nvoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1604 -OutFile Ubuntu.appx -UseBasicParsing
  25. Tip: If the download is taking a long time, turn off the progress bar by setting $ProgressPreference = 'SilentlyContinue'
  26.  
  27. Download using curl
  28. 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 distro's. Oen Command Prompt and enter this command:
  29. curl.exe -L -o ubuntu-1604.appx https://aka.ms/wsl-ubuntu-1604
  30.  
  31. 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
  32.  
  33. Note: Using curl might be preferable if you have to invoke/script download steps using Cmd shell and/or .bat / .cmd scripts.
  34.  
  35. Installing your distro
  36. For instructions on how to install your downloaded distro(s), please refer to the Windows Desktop or Windows Server installation instructions.
  37.  
  38. From Microsoft Docs: https://docs.microsoft.com/en-us/windows/wsl/install-win10
Add Comment
Please, Sign In to add comment