Windows Subsystem for Linux (WSL) (aka WSL 1) allows developers to run GNU / Linux environments – including most command line tools, utilities, and applications – directly on Windows, without Modified, without anything related to traditional virtual machines or dualboot setup.
WSL 2 (Windows Subsystem for Linux 2) is a new version of the architecture in WSL that changes the way Linux distributions interact with Windows. WSL 2 has the primary goals of increasing file system performance and adding system-wide compatibility.
Each Linux distribution can run as WSL 1 or WSL 2 and switch between versions at any time. WSL 2 is a “major overhaul” of the underlying architecture, as well as the use of virtualization technology and the Linux kernel to enable new features.
With Windows Subsystem for Linux (WSL) enabled, you can install Linux distro applications from the Microsoft Store.
Users can set WSL 1 or WSL 2 as the default architecture used as the default version, whenever a new Linux distribution is installed.
Users can also set the Linux distro version to WSL 1 or WSL 2 for the existing installed Linux distributions at any time.
This guide will show you how to set the Linux distro version to WSL 1 or WSL 2 in Windows 10.
Set the default distro version to WSL 1 or WSL 2 for new Linux distributions
1. Open PowerShell.
2. Copy and paste the command below you want to use into PowerShell and press Enter.
(Make WSL 1 the default version)
wsl --set-default-version 1
(Make WSL 2 the default version)
wsl --set-default-version 2
3. Now, you can close PowerShell if you want.
Set the distro version to WSL 1 or WSL 2 for specifically installed Linux distributions
1. Open PowerShell.
2. Copy and paste the following command into PowerShell, press Enter, and note the name of the Linux distribution (eg “Ubuntu”) you want to change the version (eg “1” or “2”).
wsl --list --verbose
3. Enter the command below into PowerShell and press Enter.
wsl --set-version <distribution name> <versionNumber>
Replace the <distribution name> in the above command with the actual Linux distribution name (eg “Ubuntu”) from step 2.
Replace <versionNumber> in the above command with the number 1 (WSL 1) or 2 (WSL 2) for the default architecture you want.
wsl --set-version Ubuntu 2
4. Now, you can close PowerShell if you want.
- How to unsubscribe and reset Windows Subsystem for Linux (WSL) distro on Windows 10