Skip to main content
Updated with latest info
Source Link
NotTheDr01ds
  • 23.6k
  • 6
  • 70
  • 112

There are currently at least three ways to upgrade your WSL2 kernel:

  1. For recent Windows versions (Windows 10 21H2 and Windows 11), wsl --update is typically the best option, but realize that there is a slight lag between the time that Microsoft releases a kernel on Github and the time that they make it available for automatic updates.

    When this question was written:

    • 5.10.60.1 was the most recent available release for automatic update on Windows 11
    • 5.10.16 was the latest for Windows 10.
    • 5.10.102.1 was the latest available in the Github repository for the WSL2 kernel. It had just been released a few days earlier on March 8th. This is why wsl --update wasn't pulling it in (at the time) for the OP -- It was simply not yet available for wsl --update (or Windows automatic updates either).

    However, now, as of the time of this edit (and for a while now), 5.10.102.1 is available via wsl --update (and automatic Windows updates) for both Windows 10 and 11 systems.:

    • 5.10.102.1 is the latest stable kernel available via wsl --update (and automatic Windows updates) for both Windows 10 and 11 systems.
    • 5.15.57.1 has just been made available as the latest Preview release (on Windows 11 Insider builds).

    Note that you may need to run wsl --update in an Administrative session to update.

    If needed, you can revert to the previous kernel release with:

    wsl --update --rollback
    

    Regardless, I recommend renaming (or moving to another location) the previous kernel before updating anyway, so that you can toggle between various kernels if needed using the .wslconfig file.

    Note: There is also currently a "Preview" release of WSL available in the Microsoft Store for Windows 11 users. If you are using this Store version, then wsl --update will not only update the kernel itself, but also the WSL Store package with the latest version. Because it is a user-level application, you no longer need to run wsl --update in an Administrative session. wsl --update --rollback is also no longer available in these releases.

  2. For older versions of Windows 10 that don't support wsl --update, please see @harrymc's answer. You can still opt in to automatic updates, and (when available) the new kernel will be upgraded via the normal Windows Update mechanism.

  3. Finally, you can certainly compile your own WSL2 kernel. It's best to start from the Microsoft sources, since it has the right selection of config options for the kernel to best operate in Windows/WSL2.

    Once you've compiled or obtained a custom kernel, you can specify it be used for all WSL2 instances by creating a .wslconfig with the appropriate section and kernel config.

There are currently at least three ways to upgrade your WSL2 kernel:

  1. For recent Windows versions (Windows 10 21H2 and Windows 11), wsl --update is typically the best option, but realize that there is a slight lag between the time that Microsoft releases a kernel on Github and the time that they make it available for automatic updates.

    When this question was written:

    • 5.10.60.1 was the most recent available release for automatic update on Windows 11
    • 5.10.16 was the latest for Windows 10.
    • 5.10.102.1 was the latest available in the Github repository for the WSL2 kernel. It had just been released a few days earlier on March 8th. This is why wsl --update wasn't pulling it in (at the time) for the OP -- It was simply not yet available for wsl --update (or Windows automatic updates either).

    However, now, as of the time of this edit (and for a while now), 5.10.102.1 is available via wsl --update (and automatic Windows updates) for both Windows 10 and 11 systems.

    Note that you may need to run wsl --update in an Administrative session.

    If needed, you can revert to the previous kernel release with:

    wsl --update --rollback
    

    I recommend renaming the previous kernel before updating anyway, so that you can toggle between various kernels if needed using the .wslconfig file.

    Note: There is also currently a "Preview" release of WSL available in the Microsoft Store for Windows 11 users. If you are using this Store version, then wsl --update will not only update the kernel itself, but also the WSL Store package with the latest version. Because it is a user-level application, you no longer need to run wsl --update in an Administrative session.

  2. For older versions of Windows 10 that don't support wsl --update, please see @harrymc's answer. You can still opt in to automatic updates, and (when available) the new kernel will be upgraded via the normal Windows Update mechanism.

  3. Finally, you can certainly compile your own WSL2 kernel. It's best to start from the Microsoft sources, since it has the right selection of config options for the kernel to best operate in Windows/WSL2.

    Once you've compiled or obtained a custom kernel, you can specify it be used for all WSL2 instances by creating a .wslconfig with the appropriate section and kernel config.

There are currently at least three ways to upgrade your WSL2 kernel:

  1. For recent Windows versions (Windows 10 21H2 and Windows 11), wsl --update is typically the best option, but realize that there is a slight lag between the time that Microsoft releases a kernel on Github and the time that they make it available for automatic updates.

    When this question was written:

    • 5.10.60.1 was the most recent available release for automatic update on Windows 11
    • 5.10.16 was the latest for Windows 10.
    • 5.10.102.1 was the latest available in the Github repository for the WSL2 kernel. It had just been released a few days earlier on March 8th. This is why wsl --update wasn't pulling it in (at the time) for the OP -- It was simply not yet available for wsl --update (or Windows automatic updates either).

    However, now, as of the time of this edit:

    • 5.10.102.1 is the latest stable kernel available via wsl --update (and automatic Windows updates) for both Windows 10 and 11 systems.
    • 5.15.57.1 has just been made available as the latest Preview release (on Windows 11 Insider builds).

    Note that you may need to run wsl --update in an Administrative session to update.

    If needed, you can revert to the previous kernel release with:

    wsl --update --rollback
    

    Regardless, I recommend renaming (or moving to another location) the previous kernel before updating, so that you can toggle between various kernels if needed using the .wslconfig file.

    Note: There is also currently a "Preview" release of WSL available in the Microsoft Store for Windows 11 users. If you are using this Store version, then wsl --update will not only update the kernel itself, but also the WSL Store package with the latest version. Because it is a user-level application, you no longer need to run wsl --update in an Administrative session. wsl --update --rollback is also no longer available in these releases.

  2. For older versions of Windows 10 that don't support wsl --update, please see @harrymc's answer. You can still opt in to automatic updates, and (when available) the new kernel will be upgraded via the normal Windows Update mechanism.

  3. Finally, you can certainly compile your own WSL2 kernel. It's best to start from the Microsoft sources, since it has the right selection of config options for the kernel to best operate in Windows/WSL2.

    Once you've compiled or obtained a custom kernel, you can specify it be used for all WSL2 instances by creating a .wslconfig with the appropriate section and kernel config.

Updated versions and info
Source Link
NotTheDr01ds
  • 23.6k
  • 6
  • 70
  • 112

While the method mentioned by @harrymc is true for older versions of WSL, recent versions (on both Windows 10 and Windows 11) support direct update without requiring you to opt-in to all other Microsoft Product updates.

Just use ...

wsl --update

If there is a new kernel, this will download it, backup the previous version, and install the new one.

If needed, you can revertThere are currently at least three ways to the previous release with:

wsl --update --rollback

I recommend renaming the previous kernel before updating anyway, so that you can toggle between various kernels if needed using the .wslconfig file.

At present, however, the 5.10.60.1 release is the most recent available for update on Windows 11. However, you can certainly compileupgrade your own from the later kernel source release available in the repo and update manually through .wslconfig if desired. It's fairly straightforward.

Side note for Windows 10 readers -- It looks like 5.10.16 may be the latest for WSL2 running on Windows 10. The primary change in 5.10.60.1 was USB/IP support. Microsoft has only "officially" supported it on Windows 11 at this point, but it does work properly on Windows 10 with the proper kernel updates.:

  1. For recent Windows versions (Windows 10 21H2 and Windows 11), wsl --update is typically the best option, but realize that there is a slight lag between the time that Microsoft releases a kernel on Github and the time that they make it available for automatic updates.

    When this question was written:

    • 5.10.60.1 was the most recent available release for automatic update on Windows 11
    • 5.10.16 was the latest for Windows 10.
    • 5.10.102.1 was the latest available in the Github repository for the WSL2 kernel. It had just been released a few days earlier on March 8th. This is why wsl --update wasn't pulling it in (at the time) for the OP -- It was simply not yet available for wsl --update (or Windows automatic updates either).

    However, now, as of the time of this edit (and for a while now), 5.10.102.1 is available via wsl --update (and automatic Windows updates) for both Windows 10 and 11 systems.

    Note that you may need to run wsl --update in an Administrative session.

    If needed, you can revert to the previous kernel release with:

    wsl --update --rollback
    

    I recommend renaming the previous kernel before updating anyway, so that you can toggle between various kernels if needed using the .wslconfig file.

    Note: There is also currently a "Preview" release of WSL available in the Microsoft Store for Windows 11 users. If you are using this Store version, then wsl --update will not only update the kernel itself, but also the WSL Store package with the latest version. Because it is a user-level application, you no longer need to run wsl --update in an Administrative session.

  2. For older versions of Windows 10 that don't support wsl --update, please see @harrymc's answer. You can still opt in to automatic updates, and (when available) the new kernel will be upgraded via the normal Windows Update mechanism.

  3. Finally, you can certainly compile your own WSL2 kernel. It's best to start from the Microsoft sources, since it has the right selection of config options for the kernel to best operate in Windows/WSL2.

    Once you've compiled or obtained a custom kernel, you can specify it be used for all WSL2 instances by creating a .wslconfig with the appropriate section and kernel config.

While the method mentioned by @harrymc is true for older versions of WSL, recent versions (on both Windows 10 and Windows 11) support direct update without requiring you to opt-in to all other Microsoft Product updates.

Just use ...

wsl --update

If there is a new kernel, this will download it, backup the previous version, and install the new one.

If needed, you can revert to the previous release with:

wsl --update --rollback

I recommend renaming the previous kernel before updating anyway, so that you can toggle between various kernels if needed using the .wslconfig file.

At present, however, the 5.10.60.1 release is the most recent available for update on Windows 11. However, you can certainly compile your own from the later kernel source release available in the repo and update manually through .wslconfig if desired. It's fairly straightforward.

Side note for Windows 10 readers -- It looks like 5.10.16 may be the latest for WSL2 running on Windows 10. The primary change in 5.10.60.1 was USB/IP support. Microsoft has only "officially" supported it on Windows 11 at this point, but it does work properly on Windows 10 with the proper kernel updates.

There are currently at least three ways to upgrade your WSL2 kernel:

  1. For recent Windows versions (Windows 10 21H2 and Windows 11), wsl --update is typically the best option, but realize that there is a slight lag between the time that Microsoft releases a kernel on Github and the time that they make it available for automatic updates.

    When this question was written:

    • 5.10.60.1 was the most recent available release for automatic update on Windows 11
    • 5.10.16 was the latest for Windows 10.
    • 5.10.102.1 was the latest available in the Github repository for the WSL2 kernel. It had just been released a few days earlier on March 8th. This is why wsl --update wasn't pulling it in (at the time) for the OP -- It was simply not yet available for wsl --update (or Windows automatic updates either).

    However, now, as of the time of this edit (and for a while now), 5.10.102.1 is available via wsl --update (and automatic Windows updates) for both Windows 10 and 11 systems.

    Note that you may need to run wsl --update in an Administrative session.

    If needed, you can revert to the previous kernel release with:

    wsl --update --rollback
    

    I recommend renaming the previous kernel before updating anyway, so that you can toggle between various kernels if needed using the .wslconfig file.

    Note: There is also currently a "Preview" release of WSL available in the Microsoft Store for Windows 11 users. If you are using this Store version, then wsl --update will not only update the kernel itself, but also the WSL Store package with the latest version. Because it is a user-level application, you no longer need to run wsl --update in an Administrative session.

  2. For older versions of Windows 10 that don't support wsl --update, please see @harrymc's answer. You can still opt in to automatic updates, and (when available) the new kernel will be upgraded via the normal Windows Update mechanism.

  3. Finally, you can certainly compile your own WSL2 kernel. It's best to start from the Microsoft sources, since it has the right selection of config options for the kernel to best operate in Windows/WSL2.

    Once you've compiled or obtained a custom kernel, you can specify it be used for all WSL2 instances by creating a .wslconfig with the appropriate section and kernel config.

added 14 characters in body
Source Link
NotTheDr01ds
  • 23.6k
  • 6
  • 70
  • 112

While the method mentioned by @harrymc is true for older versions of WSL, recent versions (on both Windows 10 and Windows 11) support direct update without requiring you to opt-in to all other Microsoft Product updates.

Just use ...

wsl --update

If there is a new kernel, this will download it, backup the previous version, and install the new one.

If needed, you can revert to the previous release with:

wsl --update --rollback

I recommend renaming the previous kernel before updating anyway, so that you can toggle between various kernels if needed using the .wslconfig file.

At present, however, the 5.10.60.1 release is the most recent available for update on Windows 11. However, you can certainly compile your own from the later kernel source release available in the repo and update manually through .wslconfig if desired. It's fairly straightforward.

Side note for Windows 10 readers -- It looks like 5.10.16 may be the latest for WSL2 running on Windows 10. The primary change in 5.10.60.1 was USB/IP support. Microsoft has only "officially" supported it on Windows 11 at this point, but it does work properly on Windows 10 with the proper kernel updates.

While the method mentioned by @harrymc is true for older versions of WSL, recent versions (on both Windows 10 and Windows 11) support direct update without requiring you to opt-in to all other Microsoft Product updates.

Just use ...

wsl --update

If there is a new kernel, this will download it, backup the previous version, and install the new one.

If needed, you can revert to the previous release with:

wsl --update --rollback

I recommend renaming the previous kernel before updating anyway, so that you can toggle between various kernels if needed using the .wslconfig file.

At present, however, the 5.10.60.1 release is the most recent available for update. However, you can certainly compile your own from the later kernel source release available in the repo and update manually through .wslconfig if desired. It's fairly straightforward.

While the method mentioned by @harrymc is true for older versions of WSL, recent versions (on both Windows 10 and Windows 11) support direct update without requiring you to opt-in to all other Microsoft Product updates.

Just use ...

wsl --update

If there is a new kernel, this will download it, backup the previous version, and install the new one.

If needed, you can revert to the previous release with:

wsl --update --rollback

I recommend renaming the previous kernel before updating anyway, so that you can toggle between various kernels if needed using the .wslconfig file.

At present, however, the 5.10.60.1 release is the most recent available for update on Windows 11. However, you can certainly compile your own from the later kernel source release available in the repo and update manually through .wslconfig if desired. It's fairly straightforward.

Side note for Windows 10 readers -- It looks like 5.10.16 may be the latest for WSL2 running on Windows 10. The primary change in 5.10.60.1 was USB/IP support. Microsoft has only "officially" supported it on Windows 11 at this point, but it does work properly on Windows 10 with the proper kernel updates.

Source Link
NotTheDr01ds
  • 23.6k
  • 6
  • 70
  • 112
Loading