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 and founder of (est. 2010). With over 21 years as a technology writer and IT Specialist, Mauro specializes in Windows, software, and cross-platform systems such as Linux, Android, and macOS.

Certifications: Microsoft Certified Solutions Associate (MCSA), Cisco Certified Network Professional (CCNP), VMware Certified Professional (VCP), and CompTIA A+ and Network+.

Mauro is a recognized Microsoft MVP and has also been a long-time contributor to Windows Central.

You can follow him on YouTube, Threads, BlueSky, X (Twitter), LinkedIn and About.me. Email him at [email protected].