This article explains how one can change the default distro for Windows Subsystem for Linux in Windows 11.
Windows Subsystem for Linux lets developers run a GNU/Linux environment directly in Windows without setting up a virtual machine or dual-boot, including most command-line tools, utilities, and applications.
By default, when you install the first Linux distro in the Windows Subsystem for Linux, it becomes the default Linux distribution.
WSL will use the default Linux distribution to run Linux commands. However, if you have multiple distros installed and want to change the default, the steps below will show you how.
Change WSL default distros in Windows 11
As described above, WSL will use the default Linux distribution to run Linux commands. However, WSL will allow you to change the default when you have multiple distributions installed.
Here’s how to do it.
First, open Windows Terminal, and select either Windows PowerShell or Command Prompt tab.
When the Windows Terminal app opens, run the commands below to list the currently installed distros.
wsl --list --all
or
wsl -l
The command above will output similar lines as the one below.
Windows Subsystem for Linux Distributions: Ubuntu (Default) kali-linux Debian
The example above lists the Ubuntu distro as the default.
To change the default, run the command format as follows.
wsl --setdefault <name of Linux distro>
Replace <name of Linux distro> with the name of the distro you want to make the default.
Example:
wsl --setdefault Debian
After running the command above, Debian will become the default distribution.
That should do it!
Conclusion:
This post showed you how to change the default WSL Linux distro in Windows 11. Please use the comment form below if you find any errors above or have something to add.