Table of Contents
Default distribution in Windows Subsystem for Linux
In some cases, you want to run more than one Linux distro in WSL. Note the asterisk, the WSL distro with the asterisk is the default distro for you.
PS C:\> wsl -l -v
NAME STATE VERSION
* Ubuntu Stopped 2
kali-linux Stopped 2
Debian Stopped 2
And when you run wsl command without any additional parameter, the default one will be start.
PS C:\> wsl
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
bon@DESKTOP-DL81K4A:/mnt/c/Windows/system32$ exit
logout
PS C:\> wsl -l -v
NAME STATE VERSION
* Ubuntu Running 2
kali-linux Stopped 2
Debian Stopped 2
Change default distribution in WSL
To change the default distribution, let’s run wsl with –set-default parameter.
PS C:\> wsl --set-default debian
PS C:\> wsl -l -v
NAME STATE VERSION
* Debian Stopped 2
Ubuntu Stopped 2
kali-linux Stopped 2
PS C:\> wsl
bon@DESKTOP-DL81K4A:/mnt/c/Windows/system32$ exit
logout
PS C:\> wsl -l -v
NAME STATE VERSION
* Debian Running 2
Ubuntu Stopped 2
kali-linux Stopped 2
ADVERTISEMENT
5/5 - (1 vote)