How to Open WSL Projects in Windows File Explorer

If you work with Windows Subsystem for Linux (WSL), you may need to open WSL files in Windows File Explorer for easier file management. This post gives some tips, providing two simple methods to achieve this.

Best Practices for Managing WSL Project Files

For best performance, always store project files on the same operating system as your development tools. If you’re developing an application in Linux using WSL, keep your files inside the Linux file system (e.g., /home/user/project) rather than using Windows-mounted directories (/mnt/c/Users/etc).

We should always consider using source control (e.g., Git or Bitbucket) to manage your WSL application code instead of manually copying files between Windows and WSL.

Ways to Open WSL Files in Windows File Explorer

1. Quick Command Method (Recommended)

The fastest way to open WSL files in Windows Explorer I’ve found is through the terminal. While inside a WSL session, run the following command:

# open windows explorer from within wsl
explorer.exe . 
Open Windows Explorer WSL

This will launch File Explorer, displaying the current directory inside your WSL environment.

2. Manual Navigation via File Explorer

Alternatively, you can manually access WSL files from Windows Explorer:

1. Open File Explorer.
2. In the address bar, enter \\wsl$\

WSL Windows File Explorer

The \\wsl$\ path only displays active WSL distributions. If you have multiple installed distros but only one appears, ensure it’s running by opening a new WSL terminal session.

For this demo, I’m going to start the Ubuntu 20.04 distro on my machine by opening a new tab in Windows Terminal:

WSL List Distros

Now I can see both WSL Linux Distribution files in the Windows Explorer:

WSL Windows Folders in Windows

From here we can drill into the folders and navigate into any of the Linux directories:

Linux Files in Windows Explorer

I hope this was useful for you, cheers!


Recent Posts
Categories
Tags

Always On Availability Groups (AAG) (4) AWS (4) AWS Redshift (6) Database Admin (72) Database Backups & Recovery (14) Database Mirroring (2) Error Messages (5) Failover Cluster Instances (FCI) (1) Git Commands (6) Importing & Exporting Data (2) Linked Servers (3) Linux Administration (2) Logging & Monitoring (1) Microsoft Patching (2) MySQL (4) Postgres (6) PowerShell Scripts (2) SQL Certificates & Encryption (3) SQL Server Agent (5) SQL Server CDC (2) SQL Server Data Types (2) SQL Server Management Studio (SSMS) (16) SQL Server Networking (3) SQL Server on Linux (1) SQL Server Patching (2) SQL Server Performance Tuning (6) SQL Server Processes (SPIDs) (7) SQL Server Replication (2) SQL Server Scripts (13) SQL Server Security (4) SQL Server Storage (10) Windows Admin (21) Windows Authentication (2) Windows Automation (1) Windows Events (2) Windows Firewall (4) Windows Subsystem for Linux (WSL) (18)