- I have no files or paths about usb on dev/
- When I plug in a flash disk, nothing appears on dev/ or mnt/ or media/ about it.
sudo lsusb
returns:unable to initialize libusb: -99
What should i do to enable usb access on bash?
sudo lsusb
returns:
unable to initialize libusb: -99
What should i do to enable usb access on bash?
Good news, it is now possible to mount USB media (including FAT formated) and network shares with drvfs on Windows 10:
Mount removable media: (e.g. D:)
$ sudo mkdir /mnt/d
$ sudo mount -t drvfs D: /mnt/d
To safely unmount
$ sudo umount /mnt/d
You can also mount network shares without smbfs:
$ sudo mount -t drvfs '\\server\share' /mnt/share
You need at least Build 16176 so you might have to opt-in to the Windows Insider programm and then update Windows. Source: https://blogs.msdn.microsoft.com/wsl/2017/04/18/file-system-improvements-to-the-windows-subsystem-for-linux/
cmd
command prompt and type ver
. It should report Microsoft Windows [Version 10.0.16176]
or newer. If not opt into Windows Insider program. Hope this helps! –
Phobia Edit:
According to a blog post from Microsoft this feature is now fixed from build 16176 and forward.
There is no USB support at the moment. Only fixed disks will be mounted (automatically) in /mnt.
Also other storage (other than auto-mounted fixed disks) are not supported, This includes CD-ROM drives, loopback devices and network shares.
Here is a link to the developer feedback page: Unable to access USB devices from bash
While it is possible to mount a drive using WSL 2, support for connecting USB devices to WSL, like a flash drive or SD card reader, is not natively supported in WSL.
Connecting USB devices to WSL IS now supported using the USBIPD-WIN opensource project however. To connect a USB device to a Linux distribution running via WSL 2:
sudo apt install linux-tools-5.4.0-77-generic hwdata
.sudo visudo
and then find the secure_path
section, at the beginning of the path section, add the tools location: /usr/lib/linux-tools/5.4.0-77-generic
.usbipd wsl list
.usbipd wsl attach --busid <busid>
.lsusb
.You should see the device you just attached and be able to interact with it using normal Linux tools. Depending on your application, you may need to configure udev rules to allow non-root users to access the device.
© 2022 - 2024 — McMap. All rights reserved.
/mnt/<drive letter>
– Abb