How to Change Default Distro in Windows Subsystem for Linux
The default Linux distribution in Windows Subsystem for Linux (WSL) is the specific operating system environment that opens automatically when you run the wsl command in your terminal. Ubuntu installs as the primary environment by default when you add your first Linux setup, but you can switch it to Debian, Fedora, or any other installed version in under one minute.
Changing this setting saves you from typing extra commands every time you open a command prompt. WSL runs Linux tools directly on your Windows PC without needing a heavy virtual machine, making quick switches simple.
Open Windows Terminal or PowerShell as administrator and use wsl –set-default to change your default Linux distribution. Run wsl –list –verbose first to see your installed distro names.
Understanding WSL Versions
Windows Subsystem for Linux operates on two main versions known as WSL 1 and WSL 2. WSL 2 provides much better performance and includes a full Linux kernel (the core software that manages communication between computer hardware and programs). Knowing the difference helps you pick the right setup before you change default WSL distro settings on your computer.
| Command Output | Meaning |
|---|---|
| (Default) | The distro that opens when you type wsl |
| Stopped | The distro is not currently running |
| Running | The distro is active in the background |
How to Change Your Default WSL Distro
To change default WSL distro settings, run a simple command in PowerShell to set your preferred Linux environment as the primary system. This ensures the correct Linux installation starts automatically whenever you open your terminal, saving you the extra step of picking it manually each time you want to use it.
- Open Windows Terminal or PowerShell.
- Right-click the icon and select Run as administrator.
- Type the following command to see your installed distros:
wsl --list --verbose - Identify the name of the distro you want to set as default.
- Run the following command to change it:
wsl --set-default <DistroName> - Replace <DistroName> with your chosen distro, for example:
wsl --set-default Ubuntu
Summary
Changing your default Linux distribution in WSL is a quick way to manage your development environment.
What happens to my files when I change the default WSL distro?
Switching the default environment leaves existing files untouched. Data remains securely stored inside the virtual disk assigned to each specific distribution. You can still get to files in your other Linux systems by using their specific commands or by finding them through Windows File Explorer.What happens to my files when I change the default WSL distro?
Switching the default environment leaves existing files untouched. Data remains securely stored inside the virtual disk assigned to each specific distribution. You can still access files in your non-default distributions by using the specific command for that distro or by navigating through the Windows file explorer network path.
Can I run multiple distributions simultaneously?
How do I change the default user for a specific distribution?
Changing the default user for a specific Linux distribution requires editing the configuration file located inside that environment. For Ubuntu, you must open the /etc/wsl.conf file, add a user section with your preferred username, and then restart your system using the wsl –shutdown command to make the new login take effect.How do I change the default user for a specific distribution?
To change the default user, you must edit the configuration file inside the distribution. For example, in Ubuntu, you can edit the /etc/wsl.conf file. Add a [user] section and specify the default username. After saving the file, restart the WSL instance using the wsl –shutdown command to apply the changes.
Was this guide helpful?
About the Author
Richard
Tech Writer, IT Professional
Richard is a writer at Geek Rewind who turns complex IT tasks into clear, step-by-step guides. He draws on years of hands-on experience in system administration and enterprise IT operations, focusing on Windows, Linux and WordPress: the problems people actually run into, and the fixes that work. His server and WordPress guides come from systems he runs himself. Richard builds and maintains the platform behind Geek Rewind, from its Ubuntu servers and Nginx configuration to its custom WordPress plugins. Many new tutorials start with readers' questions, and he's always glad to answer them in the comments.
No comments yet — be the first to share your thoughts!