MicrosoftDocs / WSL

Source code behind the Windows Subsystem for Linux documentation.

Home Page:https://docs.microsoft.com/windows/wsl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

usbipd: error: The specified WSL distribution is not running.

hirooih opened this issue · comments

First I had a error.

PS C:\WINDOWS\system32> usbipd wsl attach --busid 1-1
usbipd: error: The specified WSL distribution is not running.

The Linux distribution to be attached must be default distribution.

PS C:\WINDOWS\system32> wsl --list --all --verbose
  NAME                   STATE           VERSION
* Ubuntu                 Stopped         2
  Ubuntu-20.04           Running         2
PS C:\WINDOWS\system32> wsl --set-default Ubuntu-20.04
PS C:\WINDOWS\system32> wsl --list --all --verbose
  NAME                   STATE           VERSION
* Ubuntu-20.04           Running         2
  Ubuntu                 Stopped         2
PS C:\WINDOWS\system32> usbipd wsl attach --busid 1-1
[sudo] password for myid:
PS C:\WINDOWS\system32>

This should be described on this page.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

  • ID: e99de78d-d27a-664d-98ba-91116b7157c8
  • Version Independent ID: e99de78d-d27a-664d-98ba-91116b7157c8
  • Content: Connect USB devices
  • Content Source: WSL/connect-usb.md
  • Product: dev-environment
  • Technology: windows-subsystem-for-linux
  • GitHub Login: @craigloewen-msft
  • Microsoft Alias: crloewen

A fair ask! Maybe we can add a quick bullet point at the bottom in a "Troubleshooting" section

Added a note: fb6fd84

Can add this to the troubleshoot doc later too... but seemed like this needs to be addressed in the primary how-to instructions.

Thanks for pointing this out @hirooih!!

Thanks. I hope it will help other users.

BTW after I posted this issue ticket, I found the command has --distribution (or -d) option.

PS C:\Users\hiroo> usbipd wsl attach -b 2-1 -d Ubuntu-20.04

Using this option may be better than changing the default distribution.

The Linux distribution to be attached must be your default distribution. (See the Basic comands for WSL doc to change your default distribution).

This can be simplified to:

You may have to specify the Linux distribution to be attached by using --distribution (or -d) option.

ezoic increase your site revenue