WSL Cheat Sheet

Various commands I keep forgetting related to WSL

Shutdown all running WSL distributions:

wsl --shutdown

List all installed WSL distributions with wsl --list --verbose:

>wsl --list --verbose
  NAME                   STATE           VERSION
* Ubuntu                 Stopped         1
  docker-desktop         Stopped         2
  docker-desktop-data    Stopped         2

Convert an installed distribution from version 1 to version 2 (or vice-versa) with wsl --set-version distro version:

>wsl --set-version Ubuntu 2
Conversion in progress, this may take a few minutes...
For information on key differences with WSL 2 please visit
Conversion complete.

Version 2 is required for proper Docker for Desktop functionality. Version 1 gives direct access to serial ports (/dev/ttySx).


Be First to Comment

Leave a Reply

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