How to Update from WSL to WSL 2 in Windows 10  

    How to Update from WSL to WSL 2 in Windows 10

    How to Update from WSL to WSL 2 in Windows 10

    Published by Category: Apps & Features
    11 Sep 2020
    Designer Media Ltd


    How to Update from WSL to WSL 2 in Windows 10

    WSL 2 (Windows Subsystem for Linux 2) is a new version of the architecture in WSL that changes how Linux distributions interact with Windows. WSL 2 has the primary goals of increasing file system performance and adding full system call compatibility. Each Linux distribution can run as WSL 1 or as WSL 2, and can be switched between at any time. WSL 2 is a major overhaul of the underlying architecture and uses virtualization technology and a Linux kernel to enable its new features.

    WSL 2 uses the latest and greatest in virtualization technology to run a Linux kernel inside of a lightweight utility virtual machine (VM). However, WSL 2 is not a traditional VM experience. Learn more about the WSL 2 architecture.

    Comparing features

    Feature WSL 1 WSL 2
    Integration between Windows and Linux
    Fast boot times
    Small resource foot print
    Runs with current versions of VMWare and VirtualBox
    Managed VM
    Full Linux Kernel
    Full system call compatibility
    Performance across OS file systems

    WSL 2 is only available in 64-bit Windows 10 version 1903 build 18362.1049 or higher, OR Windows 10 version 2004 build 19041 or higher for ARM64 systems.

    See also:

    This tutorial will show you how to update from Windows Subsystem for Linux (WSL) to WSL 2 in Windows 10.

    The process of updating from WSL to WSL 2 involves the following steps:
    • Enable WSL
    • Enable Virtual Machine Platform
    • Set WSL 2 as default
    • Install a distro

    You must be signed in as an administrator to update from WSL to WSL 2.




    Here's How:

    1 Open an elevated PowerShell.

    2 Copy and paste the command below into the elevated PowerShell, and press Enter to enable the WSL optional feature. (see screenshot below)

    dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

    How to Update from WSL to WSL 2 in Windows 10-enable_wsl.png

    3 Copy and paste the command below into the elevated PowerShell, and press Enter to enable the Virtual Machine Platform optional feature. (see screenshot below)

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

    How to Update from WSL to WSL 2 in Windows 10-enable_virtual_machine_platform.png

    4 Restart the computer to apply.

    5 Open an elevated PowerShell.

    6 Copy and paste the command below into the elevated PowerShell, and press Enter to set WSL 2 as the default version used when installing new Linux distributions. (see screenshot below)

    wsl --set-default-version 2

    You might see this message after running the command above: WSL 2 requires an update to its kernel component. For information please visit https://aka.ms/wsl2kernel.

    If you do, please follow the link (https://aka.ms/wsl2kernel) and install the MSI from that page on Microsoft's documentation to install a Linux kernel on your machine for WSL 2 to use. Once you have the kernel installed, please run the wsl --set-default-version 2 command again and it should complete successfully without showing the message.

    The update from WSL 1 to WSL 2 may take several minutes to complete depending on the size of your targeted distribution. If you are running an older (legacy) installation of WSL 1 from Windows 10 Anniversary Update or Creators Update, you may encounter an update error. If you do, follow these instructions to uninstall and remove any legacy distributions.

    How to Update from WSL to WSL 2 in Windows 10-set_wsl-2_as_default_version.png

    7 You can now install and setup WSL distro apps from the Microsoft Store that will use WSL 2 by default.

    That's it,
    Shawn



  1. swarfega's Avatar
    Posts : 7,248
    Windows 10 Pro 64-bit
       #1

    Nice one Shawn
      My Computers

  2. Brink's Avatar
    Posts : 59,190
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #2

    swarfega said:
    Nice one Shawn
    Thank you Nick.
      My Computers

  3. Brink's Avatar
    Posts : 59,190
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #3
      My Computers

  4. Brink's Avatar
    Posts : 59,190
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #4
      My Computers


 

Tutorial Categories

How to Update from WSL to WSL 2 in Windows 10 Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 02:06.
Find Us




Windows 10 Forums