Contents
- 1 What Does “WSL Set Default Distro” Mean?
- 2 How to Set the Default WSL Distro
- 3 Common Issues or Gotchas
- 4 Summary
- 5 FAQs
- 5.1 What does wsl --set-default do?
- 5.2 How do I check which distro is currently the default?
- 5.3 What if I get an “Invalid distribution name” error?
- 5.4 Can I have multiple WSL distros installed?
- 5.5 Will changing the default distro affect my other distros?
- 5.6 Can I open a specific distro even if it’s not the default?
- 5.7 Does this work with both WSL1 and WSL2?
- 5.8 Does the default distro apply to Windows Terminal too?
- 5.9 What happens if I uninstall the default distro?
What Does “WSL Set Default Distro” Mean?
When you have multiple Linux distributions installed on your system (e.g., Ubuntu, Debian, Kali, etc.), Windows needs to know which one to launch by default when you type wsl
in the command line.

The default WSL distro is:
- The Linux version that launches when you just type
wsl
- The target of integrations like Windows Terminal profiles (unless explicitly set otherwise)
- The primary environment for scripts that call WSL without specifying a distribution
Pros
Easily change your primary WSL environment with one command.- Scripts and commands using plain
wsl
will run in your chosen distro automatically.
Developers can temporarily switch to a clean or isolated distro for testing without disrupting others. - Useful for users managing multiple environments (e.g., Ubuntu for dev, Kali for security).
- Prevents accidental commands running in the wrong distro when multiple are installed.
Cons
- Terminal profiles need to be manually updated if you want them to reflect the new default distro.
If the default distro is uninstalled, WSL might fail to start or auto-switch to an unintended one. - If scripts expect a specific environment, changing the default distro could break them.
- The command executes silently unless you check with
wsl -l -v
, which can be confusing.
Distro names are case-sensitive, leading to potential user errors.
No built-in GUI for setting the default (unless using third-party tools).
Why You Might Want to Change the Default Distro
- You installed a newer or preferred distro (e.g., switched from Ubuntu 18.04 to Ubuntu 22.04)
- You’re testing a script or service and want it to use a specific environment
- You need different distros for different tasks (e.g., development in Ubuntu, pentesting in Kali)
How to Set the Default WSL Distro
Step-by-step via Command Line:
List your installed distros:
bash
wsl --list --verbose
orbash
wsl -l -v
Set the default:
bash
wsl --set-default <DistroName>
Example:
bash
wsl --set-default Ubuntu-22.04
Verify it worked:
Run:bash
wsl
It should now open your selected distro.
Common Issues or Gotchas
Problem | Explanation | Fix |
---|---|---|
Invalid distro name | You typed the name wrong (case-sensitive) | Use wsl -l -v to copy the exact name |
No output on wsl | Default distro might be corrupted or not initialized | Try reinstalling or setting a different default |
WSL2 not used | Your distro may still be running under WSL1 | Convert using wsl --set-version <DistroName> 2 |
Different default in Windows Terminal | It may have its own profile settings overriding WSL default | Go to Windows Terminal → Settings → Profiles |
READ ALSO: How to uninstall wsl?
Advanced Usage Tips
- Use this command inside scripts:
wsl -d <DistroName> — <your command here>
- Set default in PowerShell script for automation:
wsl.exe –set-default Debian
- Use
wsl.conf
inside your distro to customize mounts, networking, etc.

Summary
Feature | Details |
---|---|
Command | wsl --set-default <DistroName> |
When to use | Switching preferred Linux environment |
Applies to | All WSL versions (1 & 2) |
Usefulness | Essential for multi-distro workflows |
Risk | Very low; reversible anytime |
FAQs
What does wsl --set-default
do?
It sets the specified Linux distribution as the default WSL environment. When you run wsl
without parameters, this distro will open.
How do I check which distro is currently the default?
Run:
wsl -l -v
The default distro will have (Default)
next to its name.
What if I get an “Invalid distribution name” error?
Make sure you’re using the exact name listed in wsl -l -v
— it’s case-sensitive.
Can I have multiple WSL distros installed?
Yes. You can install multiple distros from the Microsoft Store (e.g., Ubuntu, Debian, Kali) and switch the default anytime.
Will changing the default distro affect my other distros?
No. It only affects which one launches by default. Other distros remain untouched.
Can I open a specific distro even if it’s not the default?
Yes. Use:
wsl -d <Distroname>
Example:
wsl -d Debian
Does this work with both WSL1 and WSL2?
Yes. You can set the default regardless of whether it’s a WSL1 or WSL2 distro.
Does the default distro apply to Windows Terminal too?
Only if you haven’t manually changed the default profile in Windows Terminal. You can override it there.
What happens if I uninstall the default distro?
WSL will either:
Pick another installed distro as default automatically
Or fail to launch until a new default is set