Skip to content

Latest commit

 

History

History
48 lines (37 loc) · 1.5 KB

up_and_downgrade_wsl.md

File metadata and controls

48 lines (37 loc) · 1.5 KB

Up and Downgrade

Since two versions of WSL exist, it is possible to up and downgrade.

You can downgrade single images from WSL2 to WSL1 and vice-verse.

To see what WSL versions your images have:

C:\Users\jonasbn>wsl -l -v
  NAME                   STATE           VERSION
* Ubuntu-18.04           Running         2
  docker-desktop         Running         2
  docker-desktop-data    Running         2
  kali-linux             Stopped         2

You can set the WSL version for an image:

C:\Users\jonasbn>wsl --set-version kali-linux 1
Conversion in progress, this may take a few minutes...
C:\Users\jonasbn>wsl -l -v
  NAME                   STATE           VERSION
* Ubuntu-18.04           Running         2
  docker-desktop         Running         2
  docker-desktop-data    Running         2
  kali-linux             Stopped         2

And when you list afterwards, you can observe that the version of the WSL for the image has changed.

C:\Users\jonasbn>wsl -l -v
  NAME                   STATE           VERSION
* Ubuntu-18.04           Running         2
  docker-desktop         Running         2
  docker-desktop-data    Running         2
  kali-linux             Stopped         1

Resources and References

  1. dev.to: "Upgrading from WSL1 to WSL2" by Aditya Kanekar
  2. Microsoft: "Windows Subsystem for Linux Installation Guide for Windows 10"