Table of Contents
Windows Subsystem for Linux (Wsl) is a feature that allows you to run linux in a virtual machine. You can manage the machine from PowerShell with the command "wsl".
update wsl
wsl --update
list machines
wsl --list
shutdown machine
wsl --shutdown
show status
wsl --status
Create a file /etc/wsl.conf and place following lines into that file.
[boot]
systemd=true
see Install Procedure for details
sudo apt install linux-tools-generic hwdata
sudo update-alternatives --install /usr/local/bin/usbip usbip /usr/lib/linux-tools/*-generic/usbip 20
attach usb devices
usbipd list
usbipd bind --busid 2-13
usbipd attach --busid 2-13 -w Ubuntu
detach usb devices
usbipd list
usbipd bind --busid 2-13
usbipd detach --busid 2-13 -w Ubuntu
Note
|
you can check if usb device is available inside wsl2 machine by command "lsusb". |
-
wsl install procedure https://learn.microsoft.com/en-us/windows/wsl/install
-
connect usb https://learn.microsoft.com/en-us/windows/wsl/connect-usb