Upgrade 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).

The Windows Subsystem for Linux (WSL 2) is required with the UAV Toolbox Support Package for ArduPilot® Autopilots to build the ArduPilot Firmware. If you have the older version, you can upgrade WSL version by performing these steps.
Open the Windows Command Prompt as an administrator. To do this, type
cmdin the Windows Search bar, then right-click on Command Prompt and select Run as administrator.
Check your current WSL version.
Run the following command.
wsl -l -v
If the output shows VERSION 1 for your Ubuntu distribution, you need to upgrade.
Example output:
NAME STATE VERSION * Ubuntu-22.04 Stopped 1
Upgrade to WSL2.
Run these commands one by one in the Command Prompt.
wsl.exe --update wsl --set-default-version 2 wsl --set-version Ubuntu-22.04 2
Verify the upgrade.
Open the Windows Command Prompt and run:
wsl -l -v
Expected Output:
NAME STATE VERSION * Ubuntu-22.04 Stopped 2