How to Change Default Distro in Windows Subsystem for Linux
The Windows Subsystem for Linux allows you to run Linux programs right on your Windows 11 computer. You do not need to set up a complicated virtual machine. When you install the first Linux distro in the Windows Subsystem for Linux, that Linux version becomes your main choice.
Why do this? If you have more than one Linux version installed, you might want to switch which one opens automatically when you run a command.
What happens when done? Your computer will use your chosen Linux version as the primary environment for all your tasks.
How to change your default Linux version
Follow these steps to update your settings:
- Open Windows Terminal. You can choose the Windows PowerShell or Command Prompt tab.
- Note: This process requires admin privileges. You may need to run your terminal as an administrator.
- To see which versions you have installed, type the following command and press Enter:
wsl --list --all - Look at the list to see which one is currently set to (Default).
- To change the default, type this command and press Enter:
wsl --setdefault <name of Linux distro> - For example, if you want to make Debian your default, type:
wsl --setdefault Debian
After you run this command, your computer will use that version as your default for all future tasks.
Summary
Changing your default Linux version in Windows 11 is a simple process using the Windows Terminal. By using the list command, you can see all your installed versions. Using the set-default command allows you to pick exactly which one you want to use as your primary system.
How do I check which Linux distributions are installed in WSL?
What command do I use to change the default Linux distribution in WSL?
Can I have multiple Linux distributions installed in WSL?
What happens if I don't set a default Linux distribution in WSL?
Is it easy to switch between different Linux distributions in WSL?
Was this guide helpful?
Leave a Reply Cancel reply