Main Content

Upgrading from WSL1 to WSL2


This section explains the task to be completed as part of the step—Install Windows Subsystem for Linux (WSL2)—of the Hardware Setup process (using the Hardware Setup screens).


Ensure that your PC is connected to an active internet connection before proceeding with the next step.

The Windows Subsystem for Linux (WSL 2) is required with the UAV Toolbox Support Package for PX4 Autopilots to build the PX4 Firmware. If you have the older version, you can upgrade WSL version by performing these steps.

  1. Open Windows Command prompt as administrator. This can be done by typing cmd in Windows Search, right-clicking on the Command prompt entry and selecting Run as administrator.

  2. Check your current WSL version by running the below command in the command prompt.

    wsl -l -v

    If the command output mentions the WSL version 1 (as shown below), then you have WSL version 1. In this case follow the next steps to upgrade your WSL.


    * Ubuntu Stopped 1

  3. Execute the following commands on Windows Command prompt to upgrade your WSL to version 2.

    1. wsl.exe --update

    2. wsl --set-default-version 2

    3. wsl --set-version Ubuntu 2

  4. Reboot your WSL after the above commands have been executed. Launch WSL shell again. Check that the version of WSL is now version 2 by running the command wsl -l -v. The expected output is as shown below


    * Ubuntu Stopped 2