14

How do I access an external hard drive through bash-on-Ubuntu-on-windows. It doesn't seem to appear in either /media, /mnt or /dev, which seem the common places that people say to look for them in Ubuntu systems.

Note: the hard drive is HFS+ formatted: I use Paragon's HFS+ for windows and have already done an apt-get install hfsprogs which I think should allow the Linux part to read the HFS+ format. I have also tried with normal USB sticks, no of which seemed to appear anywhere.

The drive does appear in /cygdrive in cygwin, but when I navigate to cygdrive in bash it doesn't appear. Clearly it is not properly mounted there, but is some form of symbolical link that bash cannot see.

I'm not really sure if this is a Linux or a Windows issue, but there doesn't seem to be anything from Microsoft about it, though I realise it is early days for them.

Piyush Patil
  • 14,512
  • 6
  • 35
  • 54
J.Warren
  • 728
  • 1
  • 4
  • 14
  • Wrong site. You're looking for [ubuntu.se] or [su] instead. This site is for programming related questions. – Ken White Aug 13 '16 at 01:38
  • Apologies. Thanks for taking the time to look anyway – J.Warren Aug 17 '16 at 10:13
  • 2
    Well MS positions WSL primarily as a developer tool. So you could make a case that this is not off topic. – user643011 May 16 '17 at 12:43
  • This is not off-topic. From [Learn about the Windows Subsystem for Linux](https://msdn.microsoft.com/en-us/commandline/wsl/about) – the very first sentence on that page: "The Windows Subsystem for Linux lets developers run Linux environments". – Kenny Evitt Nov 16 '17 at 17:26
  • @KennyEvitt: It is off-topic. "WSL lets gamers run Linux environments", "WSL lets sysadmins run Linux environments", "WSL lets athletes run LInux environments", "WSL lets chemists run Linux environments", "WSL lets filmmakers run Linux environments" are all true, without making the Microsoft statement untrue. But the condition of "a practical problem **unique** to software development" is not met here. – Ben Voigt Nov 15 '21 at 22:19

1 Answers1

10

The Ubuntu on Windows on the current build (Build 14393, a.k.a. anniversary update) doesn't support accessing external drive. This feature is on their backlog for future consideration.

Source: https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/13355724-unable-to-access-usb-devices-from-bash

Edit: Mounting removable drives are supported since Build 16176. [1][2]

  1. https://blogs.msdn.microsoft.com/wsl/2017/04/18/file-system-improvements-to-the-windows-subsystem-for-linux/
  2. https://stackoverflow.com/a/44001783/643011
  3. https://learn.microsoft.com/en-us/windows/wsl/wsl2-mount-disk
Thomas
  • 1,959
  • 2
  • 15
  • 16
X. Liu
  • 1,070
  • 11
  • 30