How to set Linux distro version to WSL 1 / WSL 2 in Windows 10

This guide will show you how to set the Linux distro version to WSL 1 or WSL 2 in Windows 10.

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's primary goals are to increase file system performance and add 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

Step 1. Open PowerShell.

Step 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

Or:

(Make WSL 2 the default version)

wsl --set-default-version 2

How to set Linux distro version to WSL 1 / WSL 2 in Windows 10 Picture 1How to set Linux distro version to WSL 1 / WSL 2 in Windows 10 Picture 1

Set the default distro version to WSL 1 or WSL 2 for new Linux distributions

Step 3. Now, you can close PowerShell if you want.

 

Set the distro version to WSL 1 or WSL 2 for specifically installed Linux distributions

Step 1. Open PowerShell.

Step 2. Copy and paste below command into PowerShell, press Enter and write down the name of the Linux distribution (eg "Ubuntu") you want to change version (eg "1" or "2") .

wsl --list --verbose

How to set Linux distro version to WSL 1 / WSL 2 in Windows 10 Picture 2How to set Linux distro version to WSL 1 / WSL 2 in Windows 10 Picture 2

Note down the name of your Linux distribution

Step 3. Type the command below into PowerShell and press Enter.

wsl --set-version 

Replace in the above command with the actual Linux distribution name (eg "Ubuntu") from step 2.

Replace in the above command with the number 1 (WSL 1) or 2 (WSL 2) for the default architecture you want.

For example:

wsl --set-version Ubuntu 2

How to set Linux distro version to WSL 1 / WSL 2 in Windows 10 Picture 3How to set Linux distro version to WSL 1 / WSL 2 in Windows 10 Picture 3

Set the distro version to WSL 1 or WSL 2 for specifically installed Linux distributions

Step 4. Now, you can close PowerShell if you want.

Good luck.

3.9 ★ | 7 Vote