USBIP(8)

πŸ“¦
version 7.3.1 Β· 3 versions
, in alpine 3.23, alpine 3.24, arch rolling, nixos 26.05, nixpkgs unstable, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸŽ€ USBIP(8) πŸŽ€

Okay bestie, this is the manual for usbipd, which lives in the System Administration Utilities crowd πŸ’… It's the section 8 page, so you know it's the admin stuff.


✨ NAME ✨

okay so usbipd is the USB/IP server daemon πŸ¦‹ It's the thing that shares USB devices with other machines over the network.

πŸ’» SYNOPSIS ✨

usbipd [options]

πŸ“– DESCRIPTION ✨

okay so usbipd gives USB/IP clients access to exported USB devices πŸ’–

bestie, you have to explicitly export a device with usbip bind first. Until you do that, usbipd won't make it available to other hosts. No cap, it's a whole permission thing πŸ™ˆ

The daemon listens for USB/IP clients on TCP port 3240 by default 🌸

πŸŽ€ OPTIONS ✨

  • -4, --ipv4 β€” binds to IPv4. The default is both πŸ¦‹
  • -6, --ipv6 β€” binds to IPv6. The default is both πŸ¦‹
  • -e, --device β€” runs in device mode 🧚. Instead of driving an attached device, it creates a virtual UDC that you can bind gadgets to. Main character energy ✨
  • -D, --daemon β€” runs as a daemon process πŸ‘‘
  • -d, --debug β€” prints debugging information πŸ”₯
  • -PFILE, --pid FILE β€” writes the process id to FILE πŸ’œ. If you don't specify a FILE, it uses /var/run/usbipd.pid πŸ“
  • -tPORT, --tcp-port PORT β€” listens on TCP/IP port PORT 🌈
  • -h, --help β€” prints the program help message and exits πŸ’…
  • -v, --version β€” shows the version ⭐

πŸ™ˆ LIMITATIONS ✨

bestie, be careful!! usbipd has no authentication or authorization for USB/IP. Any USB/IP client can connect and use your exported devices πŸ’€

🧚 EXAMPLES ✨

Here's the basic flow for sharing a device 🫢

server:# modprobe usbip-host
server:# usbipd -D
server:# usbip list --local
server:# usbip bind --busid=1-2
  • modprobe usbip-host loads the module 🌸
  • usbipd -D starts the usbip daemon πŸ’–
  • usbip list --local lists driver assignments for USB devices πŸ¦‹
  • usbip bind --busid=1-2 binds usbip-host.ko to the device with busid 1-2. Now USB device 1-2 is exportable to other hosts, periodt ✨
  • When you want to stop exporting and use the device locally again, run usbip unbind --busid=1-2 πŸ”₯

The next example shows device mode πŸ‘‘

server:# modprobe usbip-vudc
server:# usbipd -e -D
server:# modprobe g_mass_storage file=/tmp/tmp.img
server:# usbip list --device
server:# modprobe -r g_mass_storage
  • modprobe usbip-vudc loads the module, and it's accessed through the /sys/class/udc/ interface πŸ’œ
  • usbip-host is independent of this module, so no mixing them up πŸ™ˆ
  • usbipd -e -D starts the usbip daemon in device mode 🧚
  • modprobe g_mass_storage file=/tmp/tmp.img binds a gadget to usbip-vudc. In this example, it's a mass storage gadget πŸ’…
  • usbip list --device lists the gadgets exported by the local usbipd server 🌈
  • modprobe -r g_mass_storage unbinds the gadget from usbip-vudc. In this example, the previous mass storage gadget gets unbound 😭

🫢 SEE ALSO ✨

usbip(8) is your bestie for the client side πŸ’–


okay that's the whole tea πŸ“ this page is from usbip, dated February 2009, and it's the USBIP(8) page. Stay iconic, bestie πŸ’œβœ¨