Mounting USB drives in Windows Subsystem for Linux

Windows Build ≥ 16176 can mount in Windows Subsystem for Linux (e.g. Ubuntu):

  • USB drives
  • CD drives (CDFS)
  • Network drives
  • UNC paths

I did not check:

  • USB floppy drive
  • SD card
  • DVD/Blu-Ray

More details on external drive mounting on WSL

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
    

    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 one 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