Mount drive in Windows Subsystem for Linux

To mount a drive with a letter, including a network drive:

sudo mkdir /mnt/g

sudo mount -t drvfs G: /mnt/g

To mount a network share:

sudo mkdir /mnt/folder

sudo mount -t '\\server\folder' /mnt/folder

With specific credentials:

net.exe use f: \\server\folder /user:Bob LetMeIn

Unmounting:

sudo umount /mnt/folder

Source: Chris Hoffman on HowToGeek


Comments

Popular posts from this blog

C# Record Serialization

Versioned content in MVC

Add timestamp to photo using ImageMagick