WSL2: How to map a drive from Windows to your Linux subsystem


Posted by Blake on 11/6/2021

WSL2: How to map a drive from Windows to your Linux subsystem

To map a drive to the Windows Subsystem for Linux you can do so by:

  • Open Windows Explorer
  • Click the ... tool bar and choosing Map network drive
  • If the Map network drive menu option is missing make sure This PC is highlighted on the left hand side of the Explorer Window (the available options changed based on what is selected).
  • Enter the share; all available Linux subsystems will be under the `\wsl$" share followed by the operating system.

The following is what would be needed to map to Ubuntu 20.04.

Drive Path

\\wsl$\Ubuntu-20.04

Additionally, if you just wanted to navigate to this share via Powershell you can use the following syntax:

cd "Microsoft.PowerShell.Core\FileSystem::\\wsl$\Ubuntu-20.04\home"

WSL Map Drive