Mounting USB drives in Windows Subsystem for Linux

Windows Build 16176 brought mounting of USB drives, CD drives (CDFS), Network drives, and UNC paths to Windows Subsystem for Linux (WSL). I did not take the time to test a USB floppy drive, SD card, or DVD/Blu-Ray. For full details on external drive mounting on WSL, see Microsoft Blog

USB Drives

USB hard drives, flash drives, etc. formatted as FAT, ExFAT or NTFS can be mounted in WSL.

  1. Plug in the drive to the Windows PC. Note which drive letter it appears as in Windows Explorer. Let’s assume it shows up as F:\ for this procedure.
  2. In WSL Terminal, type

     mkdir /mnt/f

    That implies that if Windows changes the USB drive letter on a subsequent session, you need to repeat this process.

  3. In WSL Terminal, type

     mount -t drvfs f: /mnt/f

Then you can create and manipulate files from both Windows and WSL on the same drive.

Details of mounting external drives in Windows Subsystem for Linux

These factors are true for Build 16184, may change for future builds.

  • Once a drive is mounted in a WSL Terminal, other WSL Terminals also gain access to this drive
  • If you close all WSL Terminals, the drive unmounts
  • If you close the WSL Terminal from which you mounted the drive, the other WSL Terminals still have access (until you close all WSL Terminals)

Mount network drives

Follow the same procedure as for USB drives, assuming the drive has a drive letter. If the network drive does not have a drive letter, but does have a UNC path then:

mount -t drvfs '\\server\share' /mnt/share

Leave a Comment