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


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

Leave a comment

Please note that we won't show your email to others, or use it for sending unwanted emails. We will only use it to render your Gravatar image and to validate you as a real person.