Is it possible install Ubuntu in Windows 10 WSL without Microsoft Store?

WindowsWindows Subsystem-for-Linux

Windows Problem Overview


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?

Windows Solutions


Solution 1 - Windows

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.

Solution 2 - Windows

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 3 - Windows

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:

  1. 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

  2. Enable WSL2

    1. Open an admin prompt (Press shift+ctrl and click on PowerShell/cmd)
    2. dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
    3. Reboot your computer
    4. Download and install the WSL2 kernel from: https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi
    5. Open a PowerShell or cmd and execute: wsl --set-default-version 2
  3. Install a Linux distro

    1. 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.
    2. 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)
    3. 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))
    4. 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
    5. Start the setup as Administrator. Example with Ubuntu: right click on ubuntu2004.exe and select Run as adminsitrator
    6. Follow the on screen instructions
  4. Test your WSL2

    1. After the setup finished and you have the Linux command prompt try to start bash from Windows' Run (Win+R)
    2. Exit from the started bash and from the bash you got after the installation
    3. Start bash from Windows' Run (Win+R) (again)

Solution 4 - Windows

Yes, It is possible to install Ubuntu without opening the store.

  1. Open settings in windows and enable developer mode.

  2. Once the developer mode is enabled, Go to Windows search and Type Bash.

  3. It will open Bash command prompt. Allow it to download Ubuntu automatically.

Cheers!!!

Solution 5 - Windows

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.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionbigspawnView Question on Stackoverflow
Solution 1 - WindowsHarunView Answer on Stackoverflow
Solution 2 - WindowsVivitView Answer on Stackoverflow
Solution 3 - WindowsAndrasView Answer on Stackoverflow
Solution 4 - WindowsGnana VikasView Answer on Stackoverflow
Solution 5 - WindowsCorbieView Answer on Stackoverflow