Mount a Drive Until Logoff
- Note the letter of the network drive that you would like to map in WSL. We will use M: in this example.
- Create a new folder for that drive letter under /mnt if it does not already exist. (ex:
mkdir /mnt/m
)
- Mount the drive with
sudo mount -t drvfs M: /mnt/m
Mount Drives in a Persistent Manner
- Ensure the folder exists for the mount target (e.g. /mnt/m)
- Open /etc/fstab and add a line such as the following:
M: /mnt/m drvfs defaults 0 0
- Reload the fstab file with
sudo mount -a