Skip to content
Follow
Windows

How to Change Default Distro in Windows Subsystem for Linux

Richard
Written by
Richard
Updated 4 min read
How to Add Music Folders in Windows Media Player
How to Add Music Folders in Windows Media Player

The default Linux distribution in Windows Subsystem for Linux (WSL) is the environment that opens when you run the wsl command in your terminal. The first distribution you install becomes the default. For most people that is Ubuntu. You can switch the default to Debian, Fedora, or any other distribution you have installed, and it takes under a minute.

Advertisement

Changing the default saves you from naming a distribution every time you open a command prompt. WSL runs Linux tools directly on your Windows PC without a heavy virtual machine setup, so switching between environments is quick. The setting works the same on Windows 11 Home and Pro.

⚡ Quick Answer

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.

Advertisement

Understanding WSL Versions

WSL comes in two versions, WSL 1 and WSL 2. WSL 2 gives you much better performance for most work and includes a full Linux kernel. The kernel is the core software that manages communication between the computer hardware and your programs. WSL 1 translates Linux calls into Windows calls instead, so it has no real kernel.

Each installed distribution runs on one of these versions, and the version is a separate setting from the default. Changing the default distribution does not convert anything from WSL 1 to WSL 2 or back. Check which version your distributions use before you change the default, so you know what kind of environment will open.

Command OutputMeaning
(Default)The distro that opens when you type wsl
StoppedThe distro is not currently running
RunningThe distro is active in the background

How to Change Your Default WSL Distro

To change the default, you run one command in PowerShell that names the distribution you want as the primary system. After that, the right Linux installation starts whenever you open your terminal. You no longer have to pick it by hand each time.

Advertisement

Before you start, keep these points in mind:

  • The distribution must already be installed. WSL cannot make a distribution the default if it is not on the PC.
  • Type the distribution name exactly as WSL lists it. A small spelling difference makes the command fail.
  • You do not need to restart Windows. Close any terminal windows that are already open and start a new one to see the new default.
  • To undo the change, run the same command again with the name of your previous default.
  1. Open Windows Terminal or PowerShell.
  2. Right-click the icon and select Run as administrator.
  3. Type the following command to see your installed distros:
    wsl --list --verbose
  4. Identify the name of the distro you want to set as default.
  5. Run the following command to change it:
    wsl --set-default <DistroName>
  6. 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. If your work moves from one project to another, you can point the default at the distribution that fits the current job and change it back later.

What happens to my files when I change the default WSL distro?

Switching the default environment leaves your existing files untouched. Your data stays in the virtual disk assigned to each distribution, and nothing is copied, moved or deleted when the default changes. You can still reach files in your other Linux systems by using their specific commands, or by browsing to them in Windows File Explorer .

Advertisement

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 means editing a configuration file inside that environment. For Ubuntu, open the /etc/wsl.conf file, add a user section with your preferred username, and save it. You need administrator rights inside Linux to edit that file.

The change does not apply right away. Run the wsl --shutdown command from PowerShell. It stops all running distributions, not Windows itself. The next time you open the distribution, it starts with the new login.

How do I change the default user for a specific distribution?

⚠️WarningTo 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.

Have a question about this guide?

Answered by AI from this guide. Good questions may be added to this page — please don't include personal details.

Tags: #Windows 11

Did this guide fix your problem?

Richard

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.

Advertisement

No comments yet — be the first to share your thoughts!

Leave a Comment

Your email address will not be published. Required fields are marked *