WSL

Windows Subsystem for Linux

WSL is a very handy tool to have in your Windows OS so that you do not need a VirtualMachine or native Linux install in your computer to run Linux. With WSL you are running Linux through Terminal that means you do not get any Graphical User Interface, however, with Windows 11 it is possible to have a GUI.

Follow the instructions given in the PX4 website below to setup WSL. Those instructions also contain the setting up of PX4 and VisualCode to that WSL, if you only need to install WSL only follow the WSL Installation guide.

Setting up you USB port with WSL

  1. You will need to download and install the latest version of usbipd-win using the link below. After installing restart your PC.

  1. Then, install Ubuntu via Microsoft Store. We installed Ubuntu 20.04.4 LTS or "Ubuntu on Windows". The last one seems to be used a lot more.

  2. Next, start Ubuntu (from Store or as application) 1st to create own username and password.

  3. Open the Ubuntu WSL terminal and type the following:

sudo apt install linux-tools-5.4.0-77-generic hwdata
sudo update-alternatives --install /usr/local/bin/usbip usbip /usr/lib/linux-tools/5.4.0-77-generic/usbip 20
  1. Attach a USB device for testing (Each windows reboot you will have to repeat this process)

  • Open the windows PowerShell as Administrator.

  • Type the following, to see which USB devices are available.

usbipd wsl list
  • Then attach your USB using:

usbipd wsl attach -b [YOUR device id (example 2-4)]

Note: The first time you attach a device to WSL requires administrator privileges; subsequent attaches will succeed with standard user privileges.

Last updated