explaingit

dorssel/usbipd-win

5,700C#Audience · developerComplexity · 2/5LicenseSetup · moderate

TLDR

A Windows background service that lets you share any USB device plugged into your Windows PC with a Linux environment running in WSL 2, using simple command-line tools and no admin rights on the Linux side.

Mindmap

mindmap
  root((usbipd-win))
    What it does
      Share USB to WSL 2
      USBIP network protocol
      Persists across reboots
    Installation
      winget install
      Installer file
      Firewall rule auto-added
    Use cases
      Microcontrollers and Arduino
      USB security keys
      Cameras and peripherals
    Requirements
      Windows 10 or newer
      WSL 2 installed
      Re-attach after reboot
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Connect a microcontroller or Arduino USB port to WSL 2 so you can flash firmware or run serial tools from Linux.

USE CASE 2

Share a USB security key or smart card from a Windows host into a Linux virtual machine running under WSL 2.

USE CASE 3

Access a USB camera or sensor from inside WSL 2 for development with tools like OpenCV.

Tech stack

C#WindowsWSL2

Getting it running

Difficulty · moderate Time to first run · 30min

Requires Windows 10 or newer with WSL 2 already installed, USB device must be manually re-attached from WSL 2 after each reboot.

GPL-3.0, free to use and modify, but any software you distribute that includes this code must also be released as open source under the GPL.

In plain English

This project lets you share a USB device connected to a Windows machine with another computer or virtual machine running Linux. The most common use case is connecting a physical USB device, such as a microcontroller, a camera, or a security key, into a Linux environment running under WSL 2 (Windows Subsystem for Linux) on the same Windows PC. Normally, WSL 2 runs Linux inside a virtual machine on Windows, which means it cannot directly see USB devices plugged into the Windows host. This software bridges that gap by running a background service on Windows that makes USB devices available over the network using a protocol called USBIP. The Linux side can then attach to that service and use the device as if it were plugged in locally. Installation is straightforward: you run an installer file or use the Windows Package Manager command winget install usbipd. The installer adds a background service, a command-line tool, and a firewall rule. From there, you use simple commands to list your USB devices, mark one as shared, and then attach it from the Linux side. Sharing a device persists across reboots, though you need to re-attach on the Linux side after a reboot or if the device is unplugged. For WSL 2 users specifically, attaching a device can be done entirely from within Windows with a single command, without needing administrator rights on the Linux side. A list of GUI tools and IDE integrations is available in the project wiki for those who prefer not to use a command line. The software supports Windows 10 and Windows Server 2019 or newer. It is released under the GPL-3.0 license.

Copy-paste prompts

Prompt 1
How do I install usbipd-win and share my Arduino USB port with WSL 2 so I can flash firmware from Linux?
Prompt 2
Walk me through the usbipd commands to list USB devices on Windows, mark one as shared, and attach it inside WSL 2.
Prompt 3
Does usbipd-win re-share my USB device automatically after a Windows reboot or do I have to run a command again?
Prompt 4
How do I set up usbipd-win to share a USB webcam into WSL 2 and use it with OpenCV in Python?
Prompt 5
Are there any GUI tools that work with usbipd-win so I don't have to use the command line?
Open on GitHub → Explain another repo

← dorssel on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.