How to Install Ubuntu on WSL2 without Microsoft Store

Strangely, downloading Ubuntu from my Microsoft Store doesn’t work on my Windows 10 workstation (maybe due to corporate AD policy restrictions). Here is the workaround that I found out which can get the Ubuntu 20.04 installed on my WSL subsystem.

Step 1: run powershll as “administrator”

Step 2: run below command to see if you can have Ubuntu installed

winget install Ubuntu

Expect below error message:

“Multiple packages found matching input criteria. Please refine the input.”

Step 3: copy away the ID under the winget source column (in my case it is “Canonical.Ubuntu”)

Step 4: use the above specific ID in your next winget command to get Ubuntu installed:

winget install -e --id Canonical.Ubuntu

And now the installation should start successfully even if you are behind the GFW in China.

1 screenshot is worth 1000 words:

 

Reference to this article for inspirations


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *