Is it possible install Ubuntu in Windows 10 WSL without Microsoft Store?
Yes, it is possible to download the app without the Store. Some available distributions are listed in the Manual Installation section of the MS guide (https://docs.microsoft.com/en-us/windows/wsl/install-manual)
The actual manual installation instructions are hidden in the Server Install section of the manual (https://docs.microsoft.com/en-us/windows/wsl/install-on-server), but my understanding is that you can just run the .appx file you downloaded and it should work anyway.
Whether it's wise to install WSL/Ubuntu on a work computer that you don't control is another question, but one which only you can answer.
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)
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!