Similarly, users can mount or map network locations in WSL environments. Any network location one can reach from within Windows can be mounted or mapped in the WSL Linux shell. In a WSL environment, users can mount network locations in two or more ways. One way is to map a network folder similar to mounting a removable drive in WSL. Once the drive is mounted with a drive letter, you can then use the mount command to map the drive to a mount point in Linux. The commands below can be used to mount a network drive assigned letter F in the WSL environment. Mapping a network folder follows a similar approach.
How to map a network folder in Windows Subsystem for Linux
As mentioned above, any network location you can reach from within Windows can be mounted or mapped from the Linux shell. If you know the UNC (Universal Naming Convention) path for a particular folder or drive, and you have access to the location, you can mount it in the WSL shell environment. For example, if the path to the network share is \server\documents, you can run the commands below to mount it in WSL. First, create a mount point in Linux to where you’d want to map the shared network folder. Run the commands below to create a mount point if it’s not already created. Once the mount point is created, run the commands below to mount the network share. If the network location is password protected, you may have to use the net use command to map the location instead. For example, you can use the net use command to mount the network path \server\documents with the username Joe and the password MyPassword to map it to your F: drive. That should mount the network location mapped to the F drive in WSL. To unmount, simply run the commands below. That should do it! The post below also shows you how to mount a removable drive in WSL. How to mount a removable drive in Windows Subsystem for Linux. Conclusion: This post showed you how to mount a network folder or share in Windows Subsystem for Linux. If you find any error above or have something to add, please use the comment form below.