Is usb supported on Bash on Ubuntu on Windows 10?

旧街凉风 提交于 2019-11-28 17:21:11

问题


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


回答1:


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/




回答2:


Edit:
According to a blog post from Microsoft this feature is now fixed from build 16176 and forward.

https://blogs.msdn.microsoft.com/wsl/2017/04/18/file-system-improvements-to-the-windows-subsystem-for-linux/

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



来源:https://stackoverflow.com/questions/38954691/is-usb-supported-on-bash-on-ubuntu-on-windows-10

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!