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 choosingMap network drive - If the
Map network drivemenu option is missing make sureThis PCis 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"
