I want to manipulate windows files with newly introduced linux bash shell in windows 10. Suppose I want to copy a file from one directory to another, is there any way to mount these drives so I can manipulate files.
-
1Are the drives not located in the /mnt directory of your system?\ – Carrein Oct 02 '16 at 15:13
2 Answers
Is there any way to mount these drives so I can manipulate files?
The following command will list your mounted drives:
ls /mnt
Your drives should (mostly) already be mounted. Note there are some restrictions:
In order for a drive to show up under /mnt/ it must meet the following criteria:
- The drive must be a fixed drive
- The drive must be formatted to NTFS.
This means that optical disc drives, network mounted drives and some USB drives will not be mounted under the Windows Linux Subsystem.
This has been raised as an issue: Drives other than C: are not mounted in /mnt #1079. It is still marked as "Open".
To facilitate interoperability with Windows, WSL uses the DrvFs file system. WSL automatically mounts all fixed drives with supported file systems under /mnt, such as /mnt/c, /mnt/d, etc. Currently, only NTFS and ReFS volumes are supported.
Source WSL File System Support
Further Reading
- 156,873
Run the command:
sudo mount -t drvfs E: /mnt/e
Reference: https://techobia.com/mounting-usb-flash-storage-devices-inside-windows-inbuilt-linux-bash/
- 113
- 1