Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

External HDD on bash on ubuntu on windows [closed]

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.

like image 986
J.Warren Avatar asked Aug 12 '16 15:08

J.Warren


People also ask

How do I access an external hard drive from terminal Ubuntu?

To find out the label of an external hard drive, open up a terminal, and use the following command. The lsblk command (list block devices) shows all attached drives. When the list block command finishes, all of the drives connected will appear in this list. If any hard drives are in use, it'll be easy to see.

Can I use an external hard drive for Windows and Linux?

Super Moderator. Any external drive should work just fine with Linux - but you'll have to use a drive formatting that works with Windows - like FAT32 or NTFS. Windows can't (native) read the various Linux drive formats, like EXT3/4 Btrfs, etc, where Linux can manage FAT32 and NTFS with some bit wrangling.


1 Answers

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://docs.microsoft.com/en-us/windows/wsl/wsl2-mount-disk
like image 172
X. Liu Avatar answered Sep 20 '22 14:09

X. Liu