Windows Subsystem for Linux (WSL) has two versions: the latest version (WSL 2) and the original version (WSL 1). You may want to downgrade a WSL distribution from WSL 2 to WSL 1 for various reasons, such as compatibility with certain tools or workflow preferences. In this post, we’ll show you how to do that in just a few simple steps.
Step 1: Check which WSL distributions you have installed and their current version. To do this, run the following command in a PowerShell terminal:
# check wsl distro versions wsl -l -v
This will list all the Linux distributions you have installed on your computer, including their WSL version.
Step 2: To downgrade a WSL distribution from WSL 2 to WSL 1, run the following command in a PowerShell terminal, replacing <distro_name> with the name of the Linux distribution you want to downgrade:
# change wsl version wsl --set-version <distro_name> 1
Step 3: To verify that the downgrade was successful, run the
wsl -l -v command again. The output should show that the WSL version of the specified distribution has been changed to 1.
That’s all you need to do to downgrade a WSL distribution from WSL 2 to WSL 1. If you want to learn more about the differences between WSL 1 and WSL 2, you can refer to the Microsoft documentation on the subject.