WSL2でUSBデバイスを使いたく,以下に従っていた.
USB デバイスを接続する | Microsoft Learn
以下のエラーに遭遇した.
$ usbipd wsl attach --busid 1-2 usbipd: error: There are no WSL distributions installed; see https://docs.microsoft.com/windows/wsl/basic-commands#install on how to install one.
また,リストさせてもインストールされているディストリビューションが見つからない.
しかし,microsoft storeからUbuntu22.04をインストールしたし,実行できるぞ.どういうことだ?
wsl -l -v Windows Subsystem for Linux has no installed distributions. Distributions can be installed by visiting the Microsoft Store: https://aka.ms/wslstore
結論,管理者側にwslをインストールしていなければならなかった.
no installed distributions · Issue #5252 · microsoft/WSL · GitHub
再度,Ubuntu22.04を管理者側で設定しなおし,usbipdを実行したら成功した.