# Attacher un périphérique USB aux distributions installées sur WSL 2

On ouvre l'**Invite de commandes** tant qu'administrateur et l'on installe **usbipd** :

```batch
winget install usbipd
```

On le ferme et on l'ouvre de nouveau en tant qu'administrateur puis on répertorie tous les appareils USB connectés à Windows, on sélectionne et copie le BUSID l'appareil que l'on souhaite attacher :

```batch
usbipd list
```

On partage l'appareil USB :

```batch
usbipd bind --busid <BUSID>
```

On attache l'appareil USB à nos distributions :

```batch
usbipd attach --wsl --busid <BUSID>
```

Quan on a terminé d'utiliser le périphérique USB dans WSL, on peut le déconnecter physiquement ou exécuter cette commande à partir de l'**Invite de commande** :

```batch
usbipd detach --busid <BUSID>
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://knowledge.jonathan-about.com/windows/windows-subsystem-for-linux/attacher-un-peripherique-usb-aux-distributions-installees-sur-wsl-2.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
