How to set default Linux distro on WSL2 on Windows 10

If you have multiple Linux distros on Windows 10, you can use these WSL commands to set the preferred one as the new default.

WSL set default Linux distro command
WSL set default Linux distro command

On Windows 10, you can install multiple Linux distributions using WSL2 (Windows Subsystem for Linux 2). The only caveat is that the first one you install will be the default automatically, which means you cannot run your preferred distro with certain commands (such as wsl) out-of-the-box if you installed another distro before the one you like.

However, if you want to use another Linux distribution, WSL includes a command to set any distro as the new default on Windows 10.

In this guide, you will learn the steps to make your preferred distro the new default on Windows 10.

Set default Linux distro on WSL2

To set a Linux distro as the default on Windows Subsystem for Linux 2, use these steps:

  1. Open Start on Windows 10.

  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.

  3. Type the following command to view a list of all available distros and press Enter:

    wsl --list

    Quick tip: You can also write the command like this: wsl -l.
  4. Type the following command to set a distro as the new default and press Enter:

    wsl --setdefault DISTRO-NAME

    In the command, replace “DISTRO-NAME” with the name of the distro to set it as default (see step 3). For example, this command makes Kali Linux the default distro:

    wsl --setdefault Kali-linux

    WSL2 set default distro

    Quick tip: You can also write the command like this: wsl -s Kali-linux.

Once you complete the steps, the distro will be set as the new default on Windows 10, so when you run a command like wsl, Kali will run by default (in this case).

About the author

Mauro Huculak is a Windows How-To Expert who started Pureinfotech in 2010 as an independent online publication. He has also been a Windows Central contributor for nearly a decade. Mauro has over 15 years of experience writing comprehensive guides and creating professional videos about Windows and software, including Android and Linux. Before becoming a technology writer, he was an IT administrator for seven years. In total, Mauro has over 21 years of combined experience in technology. Throughout his career, he achieved different professional certifications from Microsoft (MSCA), Cisco (CCNP), VMware (VCP), and CompTIA (A+ and Network+), and he has been recognized as a Microsoft MVP for many years. You can follow him on X (Twitter), YouTube, LinkedIn and About.me. Email him at [email protected].