This is a post on how to set our default Linux distribution in Windows Subsystem for Linux (WSL). If you’re making the most of WSL and have more than one Linux distribution installed, this post might come in handy.
To view your current installations of Linux, we can run the following:
wsl -l -v
The star at the distro name indicates my current default distro. If I enter WSL (by running ‘wsl’), I’ll be in the Ubuntu-20.04 distro.
To set the default Linux distro, run the following, replacing <distro_name> with one of the distro names in the image above.
wsl -s <distro_name>
Now I’ll enter WSL and show system information to confirm what distro of Ubuntu I’m in.
That’s it on setting default linux distros really.