Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is usb supported on Bash on Ubuntu on Windows 10? [closed]

  • 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?

like image 287
bcan Avatar asked Aug 15 '16 12:08

bcan


People also ask

Does WSL have access to USB ports?

Support for connecting USB devices is not natively available in WSL, so you will need to install the open-source usbipd-win project.

How do I access a USB drive from WSL?

Select the bus ID of the device you'd like to attach to WSL and run this command. You'll be prompted by WSL for a password to run a sudo command. From within WSL, run lsusb to list the attached USB devices. You should see the device you just attached and be able to interact with it using normal Linux tools.

Why are USB ports not working Ubuntu?

If USB is not detected in Ubuntu or other distros, it could be due to an issue with the USB port. The best way to check this quickly is to simply use a different USB port on the same computer. If the USB hardware is now detected, then you know you have a problem with the other USB port.


1 Answers

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/

like image 134
user643011 Avatar answered Sep 17 '22 21:09

user643011