17

I installed WSL with wsl --install, but now moving to Windows 10 20H2 I would like to update WSL (to use GUI apps for instance) but running wsl --update fails with

PS C:\WINDOWS\system32> wsl --update
Checking for updates...
Error: 0x8024500c

Does anyone know how to update WSL if you don't have access to the Windows Store? It's forbidden to me as I'm using a corporate laptop.

NotTheDr01ds
  • 28,025
Jabalu
  • 173

4 Answers4

18

There were originally two issues behind the question:

  • WSLg, for running Linux GUI applications, was only available for Windows 11 at the time.
  • The wsl --update was only updating the kernel version at the time, rather than WSL itself.

Both of those have now changed in the latest WSL releases, and yet the core question of how to update WSL without Store access is even more important today than it was then:

  • WSL is now available as an application, rather than being delivered as a Windows Feature as it was then.

  • Windows 10 users now have access to this application (and the WSLg features as a result)

  • The default delivery mechanism for the WSL application is ... The Store. Which is why it's even more important than ever to understand how to install or update it when you don't have Store access.

WSLg on Windows 10: Prerequisites

First, to install the latest WSL on Windows 10 (with or without the Store), you'll need to be using a Windows UBR (update build revision) of 2311 or later. That's the last 4 digits of your Windows build number, as in 19045.2311 (for Windows 10 22H2), which I believe indicate the monthly servicing release. You can determine the UBR by running (Get-ComputerInfo).WindowsUBR in PowerShell.

If you are running a UBR less than 2311, that's likely a temporary situation, but for now, you can upgrade by:

  • Updating Windows 10 fully

  • Going to Settings -> Windows Updates -> Check for Updates and press the Check for Updates button.

  • You should see "2022-11 Cumulative Update Preview for Windows 10 Version 22H2 for x64-based Systems (KB5020030)" available as an optional update.

  • Install it and reboot when prompted.

Once this is installed, WSL should behave the same under both Windows 10 and Windows 11 22H2.

I don't anticipate that it will be needed much in the future, but if you do happen to be on an older release of either Windows 10 or 11 that can't currently be updated as above, please see my original answer.

"Normal" Store behavior

Whereas previously just the kernel update appeared to use the Store (as mentioned in the original answer), the latest WSL version itself is now installed (and updated) as an application from the Microsoft Store. If you wsl --install under the latest Windows 10 (updated as above) or Windows 11 (22H2) releases, the Store version will be installed by default for you (unless you deliberately specify the --inbox option as well).

Windows 11 21H2 users can also upgrade to the Store version using either the Store page directly or the method mention above. After that, wsl --update will work for future updates.

Installing/updating without the Store

However, since you specifically say that you can't use the Store, you may need to use the alternative, manual package installation mechanism:

  1. Download the latest WSL app package release from the WSL Releases page in the Github repo.

  2. Reboot (to make sure that WSL is not in use at all). A simple wsl --shutdown may work, but often will not.

  3. Start an Administrator PowerShell and:

    Add-AppxPackage <path.to>/Microsoft.WSL_1.0.0.0_x64_ARM64.msixbundle
    wsl --version # to confirm
    

    Adjust the package name for the latest version you downloaded, of course.

  4. Reboot (not strictly necessary, but I've had one or two features that didn't work 100% until a full reboot after install -- I just can't remember what they were now).

WSLg (and all other WSL features) should now be available.

Note that wsl --upgrade will probably still not work without access to the store. To obtain future updates, repeat the process above for the latest release.

NotTheDr01ds
  • 28,025
11

You can easily run it with --web-download, which makes it download it from the web instead of the Microsoft Store:

wsl --update --web-download

When the Windows Store is disabled completely, though, I had errors anyway.

source: https://github.com/microsoft/WSL/issues/8603#issuecomment-1357669697

rugk
  • 494
7

Important Update: This answer is outdated. I'm leaving in place for historical purposes, but most users should read my updated answer for the latest (and more important) information.


wsl --update in Windows 10 only updates the WSL2 kernel, not WSL itself. That's not really going to add any new WSL "features" such as GUI support. The only new feature that is purely enabled through an updated kernel is USB/IP support.

In Windows 10, the WSL version is (currently, at least) locked to the Windows release. Since Windows 11 has come out, we're honestly not sure if future Windows 10 releases will receive new WSL updates. Some indications that I've seen are that the 22H2 Windows 10 will have minimal changes, but we just don't know yet.

To run GUI applications using WSLg, you'll have to upgrade to Windows 11. Microsoft has explicitly said that it is unlikely that they'll be able to bring this functionality back to Windows 10.

Alternatively, you can use a third-party X server or XRDP as in the answers to this question.

Note that under the released WSL on Windows 11, wsl --update behaves the same -- It only updates the kernel. However, Microsoft has provided a "Windows Subsystem for Linux Preview" that is available for Windows 11 users (only) in the Microsoft Store.

This WSL version is updated independently of Windows releases, so Microsoft (and users) can try out new features and fixes more often than the once-a-year Windows cycle.

In the Preview version, a wsl --update will update to the latest WSL Preview release.

There are a few limitations with running WSL as a Store app, so it's not clear to me if Microsoft will be able to resolve those, or if the Preview version will remain a "rapid release" channel with the Windows update gaining the "Stable" version once a year. It's also not clear if Microsoft will be able to bring the Store version back to Windows 10 at any point, but it seems unlikely.

Error: 0x8024500c

That error indicates an issue contacting the Microsoft Store, so it's likely that the kernel update feature uses a Store (or at least UWP delivery) mechanism. If you can't update via the Store, then you may not be able to use --update either.

However, there are several other ways to update the WSL2 kernel under Windows 10:

  • If your organization has set it, the "Receive updates for other Microsoft products when you update Windows" option (In the Settings -> Windows Update -> Advanced settings) will automatically obtain the latest WSL2 kernel release when it is available.

    I'm assuming that you don't have access to change this setting yourself, if your user permissions don't include the Store. It's typically an IT-managed setting.

  • You can try downloading the kernel update as an .msi directly from Microsoft per the "Manual Installation" for WSL page.

    Note that if you can't run the installer directly, you can probably still extract the kernel from the .msi and point to it via .wslconfig (see here for the kernel setting).

  • If all else fails, you can download the latest source release of the WSL2 kernel from the Microsoft GitHub repo, build it, and then point to it via .wslconfig (as per the previous option).

    (Insert obligatory, "In my day, we had to build the kernel for every device change ... uphill ... both ways.")

NotTheDr01ds
  • 28,025
-1

If WSL won't update then reinstall it. (This shouldn't affect your data)

You can uninstall wsl by: (This shouldn't affect your WSL distors and their data)

  • Press Windows logo key+R
  • Type this: optionalfeatures.exe
  • Look for and disable "Windows Subsystem for Linux".
  • Reboot your PC.

Now try installing WSL again

You can use wsl --install in elevated command prompt or powershell.

Once done run this (might not be needed but still):

wsl --set-default-version 2

Now check if you have WSL 2.

Head
  • 916