Upgrading from WSL1 to WSL2
Note
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).
Note
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.
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.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.
NAME STATE VERSION
* Ubuntu Stopped 1
Execute the following commands on Windows Command prompt to upgrade your WSL to version 2.
wsl.exe --update
wsl --set-default-version 2
wsl --set-version Ubuntu 2
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 belowNAME STATE VERSION
* Ubuntu Stopped 2