How to Change Your Default Distro in WSL

This post is a quick note on how to set your default Windows Subsystem for Linux Distro, which is useful for when managing multiple WSL installations on a computer.

Setting Default WSL Distro

First,we can list our installed WSL distributions by running wsl -l -v, note the name of the Linux distro you want as your new default. Then, run wsl -s <wsl-distribution-name> to set a new default distro:

# show installed wsl distros (take note of distro name)
wsl -l -v

# set default wsl distro
wsl -s <wsl-distribution-name>
wsl default distro

The above screenshot shows a demo of listing the installed WSL distros and changing the default distro from Ubuntu-20.04 to Debian.

Hope this is useful. If aye, or even if nah, check out my other WSL blog posts by clicking the WSL Tag below!