Skip to content

How to update the WSL2 kernel on current Windows 10 #5650

Closed

Description

Currently,

$ uname -a
Linux MyPC 4.19.104-microsoft-standard #1 SMP Wed Feb 19 06:37:35 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

I am on current Windows 10 19041.388 and I would to know how WSL2 kernel updates. I see that Settings Apps has WSL Update package...

Will it occur with Windows Update, and I have only to wait? or is there another way?

Thanks

Activity

  1. expatjedi commented on Jul 25, 2020

    @expatjedi

    Before installing WSL 2, you must enable the "Virtual Machine Platform" optional feature.

    Open PowerShell as Administrator and run:

    dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
    

    Open PowerShell as Administrator and run this command to set WSL 2 as the default version when installing a new Linux distribution:

    wsl --set-default-version 2
    

    You might see this message after running that command:

    WSL 2 requires an update to its kernel component. For information please visit https://aka.ms/wsl2kernel.

    Please follow the link (https://aka.ms/wsl2kernel) and install the MSI from that page on our documentation to install a Linux kernel on your machine for WSL 2 to use. Once you have the kernel installed, please run the command again and it should complete successfully without showing the message.

    My note: After completed these steps don't forget to set your distribution version to WSL 2. You don't need to reinstall the ubuntu. I used this command:

    wsl --set-version Ubuntu-20.04 2
    

    Source: https://docs.microsoft.com/en-us/windows/wsl/install-win10

  2. angelog0 commented on Jul 25, 2020

    @angelog0
    Author

    @koraylinux , I have not asked how to install WSL2. I already have WSL2 installed and done all steps you suggest! There are posts saying there is a new version of the kernel for WSL2, so I simply asked how to upgrade it in current version of Windows 10, if one can... Current (see above) not insider or other development version of Windows.

  3. expatjedi commented on Jul 25, 2020

    @expatjedi

    Could you share the link where you seen the discussion about new kernel?

  4. angelog0 commented on Jul 25, 2020

    @angelog0
    Author

    Here, for example.

  5. AleCx4 commented on Jul 26, 2020

    @AleCx4

    I am wondering the same thing. I have WSL2 and have made everything already to force my Ubuntu install to work with WSL2, but upon running the command: uname -r I get greeted with: 4.19.104-microsoft-standard, for many reasons I need 4.19.121, mainly because we can now use CUDA on WSL2 and settup a proper M.L environment on windows. Downloading the .msi installer from the official Microsoft page just updates it to version 4.19.104.

    Guess we are going to have to wait for the actual update to appear on the system for itself?

  6. therealkenc commented on Jul 28, 2020

    @therealkenc

    Current (see above) not insider or other development version of Windows.
    #5642, for example.

    That issue didn't state build number, but did state right at the top "Windows Insider Program with Dev Channel".

    On 2004 aka 19041 the kernel is installed via https://aka.ms/wsl2kernel. Whether that msi package gets updated to a new kernel absent some (hard to imagine) critical bug in the kernel seems unlikely. [But I wouldn't want to jinx that with a "never".]

    That CUDA is not available in Win10 2004 goes without saying.

  7. korypostma commented on Nov 1, 2020

    @korypostma

    As of 2020-10-31 the msi installs 4.19.128-microsoft-standard

  8. PavelSosin-320 commented on Nov 23, 2020

    @PavelSosin-320

    I always tried on 2 machines - the same result: WSL2 Kernel update does nothing! According to WSL documentation page, it should be already 5.4 but it uname shows 4.9. I can't accomplish some installation procedure like runc, because it explicitly requires 5.2 at least. Everything related to running OCI containers is messed - it requires cgroups v2 and checks kernel version. Is it only uname bug or normal WSL2 Linux Kernel is only a promise?

  9. matheussouza9 commented on Nov 24, 2020

    @matheussouza9

    According to Windows Command Line Blog, WSL2 kernel updates will be available through Windows Update.

    I got an update, a month ago, to the 4.19.128 version, but there is a new stable kernel release, 5.4.51. Unfortunately, this new version isn't available yet through Windows Update (I don't know why).

    Windows Update History Screenshot

  10. Biswa96 commented on Nov 24, 2020

    @Biswa96
  11. PavelSosin-320 commented on Nov 26, 2020

    @PavelSosin-320

    The Microsoft catalog update contains 2 cab files for different architectures but wsl --update command ignores them and reports that the 4.19 is the recent version and nothing to update. Looks like new WSL Kernels are distributed via a different channel. I tried to install the new Kernel using cab but it installs nothing. From the wsl's point of view, the cab is empty. msi installer doesn't work too - the old Kernel version is not replaced and Kernel.rollback file is not created.

  12. DoctorWho8 commented on Nov 26, 2020

    @DoctorWho8

    Actually yes it does. run wsl --shutdown from an administrator upscaled window. In the location where you stored the extracted MSI kit, run that. And then restart WSL from that same window by entering wsl at the prompt and enter into its prompt the uname -a function. Restart docker if you run it as well.

  13. PavelSosin-320 commented on Nov 27, 2020

    @PavelSosin-320

    Doctor Who (@DoctorWho8) Unfortunately
    wslupdate54
    , it does nothing

  14. 34 remaining items

  15. CaseyLabs commented on Oct 10, 2022

    @CaseyLabs

    Robert Sokolewicz (@rsokolewicz) - it sounds like your Ubuntu installation is still running under WSL1.

    Even though you've set the WSL Default Version to 2, that setting doesn't get applied to machines that were originally created under WSL1.

    You can upgrade your Ubuntu distribution to WSL2 by running:

    wsl --set-version Ubuntu-20.04 2
    

    See here for more details:
    https://superuser.com/questions/1725627/which-linux-kernel-do-i-have-in-wsl

  16. rsokolewicz commented on Oct 12, 2022

    @rsokolewicz

    hi CaseyLabs (@CaseyLabs), that worked for me. thanks :)

  17. bluebrown commented on Dec 23, 2022

    @bluebrown

    This page doesn't show the 5.15 kernel. https://www.catalog.update.microsoft.com/Search.aspx?q=wsl. If I try wsl --update, I don't get it either.

    $ wsl --status
    Default Version: 2
    
    Windows Subsystem for Linux was last updated on 04-Nov-22
    The Windows Subsystem for Linux kernel can be manually updated with 'wsl --update', but automatic updates cannot occur due to your system settings.
    To receive automatic kernel updates, please enable the Windows Update setting: 'Receive updates for other Microsoft products when you update Windows'.
    For more information please visit https://aka.ms/wsl2kernel.
    
    Kernel version: 5.10.102.1
    
    $ wsl --update
    Checking for updates...
    The Windows Subsystem for Linux kernel can be manually updated with 'wsl --update', but automatic updates cannot occur due to your system settings.
    To receive automatic kernel updates, please enable the Windows Update setting: 'Receive updates for other Microsoft products when you update Windows'.
    For more information please visit https://aka.ms/wsl2kernel.
    

    I cannot enable automatic update since its managed by my org. So I want to install 5.15 kernel manually. How to do that?

  18. bluebrown commented on Dec 23, 2022

    @bluebrown

    Biswapriyo Nath (@Biswa96) , is there a install without the store? I cant install stuff from the store for some reason.

  19. Biswa96 commented on Dec 23, 2022

    @Biswa96

    is there a install without the store?

    Sure. Just download the msixbundle file from here https://github.com/microsoft/WSL/releases and install it with Add-AppxPackage command in Powershell. Remember that it requires certain versions of Windows 10 or 11 OSes which can be learned from here.

  20. bluebrown commented on Dec 23, 2022

    @bluebrown

    Biswapriyo Nath (@Biswa96), OK, thanks. Unfortunately, this didn't change the kernel verion it seems. I have removed the old kernel update previously. Then from admin pwsh

    Add-AppxPackage C:\Users\00300201\Downloads\Microsoft.WSL_1.0.3.0_x64_ARM64.msixbundle
    

    The output here is in german but It said there is no kernel, and then I did wsl update

     wsl --status
    Standardversion: 2
    
    Der Windows-Subsystem für Linux-Kernel kann mit „wsl --update“ manuell aktualisiert werden. Aufgrund Ihrer Systemeinstellungen können jedoch keine automatischen Updates durchgeführt werden.
    Um automatischen Kernel-Updates zu erhalten, aktivieren Sie die Windows Update-Einstellung: „Empfangen von Updates für andere Microsoft-Produkte, wenn Windows aktualisiert wird“.
    Weitere Informationen finden Sie unter https://aka.ms/wsl2kernel.
    
    Die WSL 2-Kerneldatei wird nicht gefunden. Wenn Sie den Kernel aktualisieren oder wiederherstellen möchten, führen Sie bitte das "wsl.exe--Update" aus.
    
    wsl --update
    Es wird nach Updates gesucht...
    Updates werden heruntergeladen...
    Updates werden installiert...
    Diese Änderung wird beim nächsten vollständigen Neustart von WSL wirksam. Führen Sie „wsl--shutdown“ aus, um einen Neustart zu erzwingen.
    Kernel-Version: 5.10.102.1
    

    And the kernel is still 5.10.102.1

     wsl --status
    Default Version: 2
    
    Windows Subsystem for Linux was last updated on 23-Dec-22
    The Windows Subsystem for Linux kernel can be manually updated with 'wsl --update', but automatic updates cannot occur due to your system settings.
    To receive automatic kernel updates, please enable the Windows Update setting: 'Receive updates for other Microsoft products when you update Windows'.
    For more information please visit https://aka.ms/wsl2kernel.
    
    Kernel version: 5.10.102.1
    

    My Windows version should be OK for this

    Edition	Windows 10 Enterprise
    Version	22H2
    Installed on	‎21-‎Jun-‎21
    OS build	19045.2251
    Experience	Windows Feature Experience Pack 120.2212.4180.0
    
  21. Biswa96 commented on Dec 23, 2022

    @Biswa96

    Do you have any kernel option in %UserProfile%\.wslconfig file ?

  22. bluebrown commented on Dec 23, 2022

    @bluebrown

    Biswapriyo Nath (@Biswa96) , no. I dont have a .wlsconfig at all in my profile folder. I also checked the admin users profile folder.

  23. degarb commented on Feb 4, 2023

    @degarb

    wsl --set-default-version 2 fails,
    and,
    updating msi just hangs. ( I have done everything on, https://dockerwebdev.com/tutorials/install-docker/) (One reason I use windows is because instructions for anything linux never work, unlike windows. I have been an on off linux user since 1999.)

  24. degarb commented on Feb 4, 2023

    @degarb

    Also, repos never work for me. My MS store, works about 10 percent of the time. So, I can't install ubuntu from there either.

  25. codingexcuse commented on May 17, 2023

    @codingexcuse

    wsl --update just run this in windows powershell it worked for me

  26. lizy-coding commented on Jul 8, 2023

    @lizy-coding

    My environment is win11 i5 64-bit
    Use the administrator to open powerShell
    first ,wsl --udate,
    seconed check version wsl --version core > 5
    image

  27. TBBle commented on Jul 8, 2023

    @TBBle

    The latest 5.15 series kernel release is 5.15.90.1. There's a 6.1 series release but I'm not sure why it's not yet being distributed (might still be WIP?).

    If you're stuck on 5.10.102.2 or older, that's the latest release from the Microsoft Update Catalog, I suspect in this case one needs to switch to the Microsoft Store version of WSL to get newer kernels.

    Looking at https://github.com/microsoft/WSL/releases, the 1.3 series of the Windows Store version of WSL includes Linux 5.15.90.2-3, so I'm assuming the 6.1 series is not ready yet. (That version doesn't appear on the WSL2-Linux-Kernel repo AFAICT)

    image

    Anyway, since this ticket predates the Microsoft Store move, I'd suggest anyone having problems with updates after 5.10.102.2 open a new ticket, with full details, particularly wsl --version output, as this ticket is closed and probably not being looked at by many people.

  28. TaduJR commented on Oct 12, 2023

    @TaduJR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions