Bryan’s Ruminations

Where I think hard, try to be fair, and sometimes get carried away.
Home Blog Books Podcasts Uses About Contact
Home Blog Books Podcasts Uses About Contact
Home Blog Posts Mount Removable Drives in WSL2

Mount Removable Drives in WSL2

by Bryan on in 🗒️Notes To Myself

Windows Subsystem for Linux doesn’t automatically mount removable drives, which has long been a source of frustration for me. I want to leave a note to myself with my findings. If this helps anyone else, even better!

There are two approaches I’ve used:

  1. Bash script to mount removable drive
  2. Utilize /etc/fstab to mount removable drive

Bash Script Approach

Using a bash script is a straightforward way to mount drives. My script is very simple, first checking if the directory I’m going to use with the mount exists, and if not, create it, and then mount the drive (I’m a bash newb, so please feel free to suggest improvements):

#!/bin/bash
readonly DPath='/mnt/d'

if [ -d $DPath ]; then echo "$DPath already exists" else sudo mkdir /mnt/d fi sudo mount -t drvfs D:\ /mnt/d

Utilize /etc/fstab

I recently stumbled upon this option, in which WSL processes /etc/fstab at instance start. This is basically set it and forget it. Here’s what I added to my /etc/fstab: D:\ /mnt/d drvfs

Useful Links

  • File System Improvements to the Windows Subsystem for Linux
  • Automatically Configuring WSL

Newer Older
Categories
📚 Books 4 🍎 Health and Fitness 172 Companies That Could Do Better 2 Cool Stuff 8 Cutting The Cord 4 Day Job 3 Developer Stuff 56 Eats and Drinks 18 Education 1 Entertainment 6 Family & Friends 26 In General 114 IndieWeb 1 My Weight Loss Journey 3 🗒️Notes To Myself 1 Politics 3 Project 18,253 8 Reviews 6 Security 2 Site Information 24 Sports 68 Technology 27 Travel 2 Weblog Applications 23
© 2026 - Bryan Daneman - RSS
Home About Uses
Archives Books Podcasts Contact
Bluesky Mastodon LinkedIn Github Strava