Menu & Search
How to Set a Default Linux Distro in WSL

How to Set a Default Linux Distro in WSL

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.


1 Comment

  1. […] Lastly, I’m now exiting (‘exit’ command) out of WSL, listing out my Linux distros and setting this Ubuntu 20.04 distro as my default. […]