'Is it possible install Ubuntu in Windows 10 WSL without Microsoft Store?
On my work are not allowed to install apps from the Microsoft Store. Yes, this is a bank, that not supported Windows 10 (it's hell).
Is it possible to install Ubuntu in WSL without downloading it from the app store?
Or is it possible to download Ubuntu app without Microsoft Store and then install it?
Solution 1:[1]
I had the same problem, could do it like this (from PowerShell):
# go into some folder into which you want the file to be downloaded
cd <somefolder>
# download Ubuntu 20.04
Invoke-WebRequest -Uri https://aka.ms/wslubuntu2004 -OutFile Ubuntu.appx -UseBasicParsing
# install downloaded *.appx file
Add-AppxPackage .\Ubuntu.appx
Afterwards I did Windows+S and typed "Ubuntu" to show the installed app, then executed it to finish setup (new user name + password must be given).
I checked the success doing: wsl --list --verbose and received this:
NAME STATE VERSION
Ubuntu-20.04 Running 1
So finally, I needed to convert my Ubuntu to WSL2 like this:
wsl --set-version Ubuntu-20.04 2
Voila!
Solution 2:[2]
I created a powershell script to install wsl2 with optional X-Windows and Pulse Audio support. I also captured my experience with installing wsl without Store access in the Readme.md.
For the detail see here: https://github.com/andras-varro/wsl2i
I believe these are the most important points:
Check if your installation supports WSL2: Windows logo key + R, type winver [enter]. You should have Version 1903 or higher, with Build 18362 or higher
Enable WSL2
- Open an admin prompt (Press shift+ctrl and click on PowerShell/cmd)
- dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
- Reboot your computer
- Download and install the WSL2 kernel from: https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi
- Open a PowerShell or cmd and execute: wsl --set-default-version 2
Install a Linux distro
- Please only download an available distro from here: https://docs.microsoft.com/en-us/windows/wsl/install-manual Explanation: if you install through appx installer without Windows Store enabled, you might run into a 'File not found' or 0x80070002 error.
- Create a location on your system drive (see: https://docs.microsoft.com/en-us/windows/wsl/install-win10#troubleshooting-installation, but it works for me on D: drive) where you want your distro to run from (like c:\work\wsl)
- Extract the downloaded distro appx file using your favorite zip tool (7Zip or WinZip or ..) into the selected location (Right click on the appx and extract to the created folder (like c:\work\wsl))
- Set access rights for your Linux installer folder so that everybody has all the rights Open a cmd or PowerShell and execute: icacls [your folder] /t /grant Everyone:(OI)(CI)F Example: icacls c:\work\wsl /t /grant Everyone:(OI)(CI)F
- Start the setup as Administrator. Example with Ubuntu: right click on ubuntu2004.exe and select Run as adminsitrator
- Follow the on screen instructions
Test your WSL2
- After the setup finished and you have the Linux command prompt try to start bash from Windows' Run (Win+R)
- Exit from the started bash and from the bash you got after the installation
- Start bash from Windows' Run (Win+R) (again)
Solution 3:[3]
Yes, It is possible to install Ubuntu without opening the store.
Open settings in windows and enable developer mode.
Once the developer mode is enabled, Go to Windows search and Type Bash.
It will open Bash command prompt. Allow it to download Ubuntu automatically.
Cheers!!!
Solution 4:[4]
You can use winget (Windows Package Manager):
winget install -e --id Canonical.Ubuntu
To get another version than the "latest", search for them via:
winget search -s winget Ubuntu
If you omit the -s winget option, the versions from other sources like the Microsoft store will be displayed too.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Vivit |
| Solution 2 | |
| Solution 3 | ravibagul91 |
| Solution 4 |
