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.
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.Add-AppxPackage
to add each application package (*.appx
) to the user profile.
~ 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:
-
- 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.
- 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.
Prateek Singh
Related posts
1 Comment
Leave a ReplyCancel reply
Categories
Author of Books
Awards
Open Sourced Projects
Author at
Blog Roll
Mike F RobbinsDamien Van Robaeys
Stéphane van Gulick
Kevin Marquette
Adam Bertram
Stephanos Constantinou
Francois-Xavier Cat
Ravikanth Chaganti
Roman Levchenko
Blog Stats
- 1,132,500 People Reached
Hi Prateek,
good post – as always.
Question: https://aka.ms/wsl-ubuntu-1804
Do you know a Powershell-way to get the information which distros are available in the store? This would save us from hardcoding the version-info in $URL and alter it every time a new one is coming up.
Keep on rocking, coding and building 😉
THX!