Menu & Search
How to Open WSL Projects in Windows File Explorer

How to Open WSL Projects in Windows File Explorer

This is a guide on how to open WSL files in Windows File Explorer, with added descriptions.

The best practice for managing project files in WSL is to store your files on the same Operating System as the tools your plan to use. So if the reason you’re using WSL is to develop an app in Linux, then keeping your files in WSL (use Linux root directories, not /mnt/c/Users/etc).

Also to note, copying files to and from WSL and your local Windows machine can usually be avoided by storing all your WSL application code within source control (e.g. Git / Bitbucket).

With that said, there are 2 ways to open WSL directories in Windows Explorer.

The quick way of opening WSL project files in Windows Explorer is to run the following, while in your Linux terminal session –

# open windows explorer from within wsl
explorer.exe . 
WSL Ubuntu

This opens the directory you are already working in on your Terminal.

… Now follows, the alternative method of opening WSL project files in Windows Explorer.

Open Windows Explorer and navigate to \\wsl$\ as shown –

WSL Windows File Explorer

The above is showing my only running WSL Linux distribution, even though I have 3 WSL distros installed.

WSL List Versions

I’m going to open the Ubuntu 20.04 distro in a new tab in Windows Terminal to start it up –

WSL Distros

Now I can see both distributions files in Windows Explorer –

WSL Windows Files

From here we can drill into the folders and navigate to any directory –

WSL Windows Explorer

For further reading, see this Microsoft Docs link for more info on WSL Best Practises.

Share

0 Comments