Accessing WSL (Windows Subsystem for Linux) files from PowerShell and Vice Versa


To access WSL (Windows Subsystem for Linux) files from PowerShell, you can do so through the special \\wsl$\
network path or by navigating directly to the WSL distribution's file system mounted under your user profile. Here are the two main ways:
1. Using the \\wsl$
Network Path (Recommended)
This gives you access to the Linux file system in a user-friendly way.
cd "\\wsl$\Ubuntu-20.04\home\<your-username>"
Steps:
Open PowerShell.
Use
cd
to navigate to your Linux home directory via the\\wsl$
path.Replace
Ubuntu-20.04
with your actual WSL distro name (wsl -l
shows a list).Replace
<your-username>
with your Linux username.
You can also explore this path in File Explorer:
Open
Run
(Win + R
)Type:
\\wsl$\Ubuntu-20.04
2. Access via AppData (Not Recommended for Writing)
You can access the raw WSL filesystem from this hidden path:
cd "$env:LOCALAPPDATA\Packages"
Then navigate to the folder:
...\CanonicalGroupLimited.UbuntuonWindows_<random>\LocalState\rootfs\
⚠️ Warning: Avoid editing files here directly as it may cause corruption. This is intended for internal use.
Access Windows Files from WSL
If you want to do the reverse—access Windows files from inside WSL:
cd /mnt/c/Users/YourWindowsUsername/Desktop
Check Installed Distros
Run this in PowerShell to list installed WSL distros:
wsl -l
Subscribe to my newsletter
Read articles from Favour Olumese directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Favour Olumese
Favour Olumese
Hello, I am Favour. I am a Python enthusiast. The Coding Process is a place where I document and consolidate what I learn on my journey towards becoming a programmer. Kindly join me. I am also a poet and non-fiction writer. You could visit https://favourolumese.medium.com to read my writings. Thank you.