How to Set WSL 2 as Default in Windows 11
Setting WSL 2 as your default architecture ensures that any new Linux distribution installed on Windows 11 automatically utilizes the latest virtualization platform, improved file system performance, and full system call compatibility. This guide outlines the straightforward command-line steps required to configure WSL 2 as your global default for all future Linux installations.
Step 1: Open PowerShell as Administrator
Press the Windows Key, type PowerShell or Terminal, right-click the application, and select Run as administrator.
Step 2: Set WSL 2 as the Default Version
In the command prompt, enter the following command and press Enter:
wsl --set-default-version 2Once executed, you will see a confirmation message stating: “For information on key differences with WSL 2 please visit https://aka.ms/wsl2kernel” or confirming the operation completed successfully.
Step 3: Verify the Configuration
To confirm that WSL 2 is configured as the default architecture, run:
wsl --statusLook for the line that reads Default Version: 2. Any new Linux distribution downloaded from the Microsoft Store or installed via the command line will now deploy using the WSL 2 architecture by default.
Managing Existing Distributions (Optional)
Changing the default version only applies to newly installed distributions. If you have existing WSL 1 installations that you want to upgrade to WSL 2, follow these steps:
List all installed distributions to see their current version:
wsl --list --verboseConvert a specific distribution to WSL 2 by running:
wsl --set-version <DistributionName> 2(Replace
<DistributionName>with the exact name shown in the list, such asUbuntuorDebian.)