I was looking for a way to access the shared drives that are mounted to Windows from within WSL2. It was apparent to me to mount local drives (e.g. C:\ and D:\), which typically have the path /wsl/x
, but for shared drives (which are mounted network drives) this work differently.
I found a post in Stack Overflow here which signposted to the Microsoft Learn Documentation here.
sudo mkdir /folder
sudo mount -t drvfs '\\server\share' /folder
This is very useful in that it leverages in linux commands sych as rsync
to perform data back-up.