Skip to main content

WSL basic CLI commands

List of installed VMs

wsl -l -v

List of all online distro

wsl -l -o
wsl --list --online

List of installed VMs

wsl --list --verbose

Attach to specific instance

wsl -d InstanceName

To set default distro for wsl

wsl --set-default <Distribution Name>
wsl --install -d Ubuntu-22.04

Delete wsl instance

wsl --unregister <DistributionName>

WSL status

wsl --status

Attach disk to wsl

wsl --mount <DiskPath>