Hey, Once again with a quick blog post something very generic but, useful for me when I am testing or fiddling around various Linux distribution packages on WSL. I am currently writing a book on Windows Subsystem for Linux and this is very handy for that.

WSL distribution packages can be easily downloaded with PowerShell, using the Invoke-WebRequest cmdlet and passing the download URL as an argument. Following is a sample command to download Ubuntu 18.04 application package, similarly, other URLs mentioned in the previous sections can be used to download various flavors of WSLs. The progress bar is intentionally muted by changing the progress preference variable $ProgressPreference = 'SilentlyContinue' this will download the package quicker.

 

 

This will start downloading WSL Distro for Ubuntu 18.04 as a file: wsl-ubuntu-1804.appx. Once the download is complete. you can use Invoke-Item Cmdlet on the .appx file in the current working directory to run launch the application installation GUI, then click next to install.
Alternatively, all the web URLs can be iterated and downloaded one by one using the PowerShell cmdlet: Add-AppxPackage to add each application package (*.appx) to the user profile.

PowerShell install WSL Distro

Optical Character Recognition
~ Author of “PowerShell Guide to Python“,  and currently writing a Book on “Windows Subsystem for Linux (WSL)


All my books are available as a discounted bundle:

    1. PowerShell Guide to Python : This PowerShell Scripting guide to Python is designed to make readers familiar with syntax, semantics and core concepts of Python language, in an approach that readers can totally relate with the concepts of PowerShell already in their arsenal, to learn Python fast and effectively, such that it sticks with readers for longer time.
    2. Windows Subsystem for Linux (WSL) Keywords, definitions, and problems WSL solve and how it works under the hoods. From download to setup to interoperability this book even covers details like the architecture of Windows subsystem for Linux and new features in WSL 2 with some wonderful use cases.

 


Subscribe to our mailing list

* indicates required