Top Tags

WSL basic CLI commands

WSL basic CLI commands

List of installed VMs

bash
1wsl -l -v

List of all online distro

bash
1wsl -l -o
2wsl --list --online

List of installed VMs

bash
1wsl --list --verbose

Attach to specific instance

bash
1wsl -d InstanceName

To set default distro for wsl

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

Delete wsl instance

bash
1wsl --unregister <DistributionName>

WSL status

bash
1wsl --status

Attach disk to wsl

bash
1wsl --mount <DiskPath>