Access Windows 11 Files from WSL Linux Terminal
Windows Subsystem for Linux (WSL) automatically mounts your local Windows drives into the Linux environment, allowing you to view, edit, and execute Windows 11 files directly from your Linux command line. This guide covers how to navigate to your Windows filesystem, interact with files using standard Linux commands, and bridge the two environments efficiently.
Locating Your Windows Drives
WSL mounts all active Windows storage drives under the
/mnt/ directory by default.
- The Windows C: drive is mapped to
/mnt/c/ - The Windows D: drive is mapped to
/mnt/d/(and so on for any additional drives or partitions)
Navigating to Your User Files
To access your personal Windows 11 user folders (such as Desktop,
Documents, or Downloads), navigate to your user profile directory
located within /mnt/c/Users/.
Go to your Windows user directory:
cd /mnt/c/Users/YourWindowsUsername/(Replace
YourWindowsUsernamewith your actual Windows account folder name).Access common folders directly:
Desktop:
cd /mnt/c/Users/YourWindowsUsername/DesktopDownloads:
cd /mnt/c/Users/YourWindowsUsername/DownloadsDocuments:
cd /mnt/c/Users/YourWindowsUsername/Documents
Managing Windows Files with Linux Commands
Once inside a Windows directory, you can run standard Linux utilities to create, view, and modify files.
List files and folders:
ls -laRead a file:
cat filename.txtEdit a file using a Linux editor (such as Nano or Vim):
nano filename.txtCopy a file from Windows to your native Linux home directory:
cp /mnt/c/Users/YourWindowsUsername/Documents/report.pdf ~/
Launching Windows Applications from WSL
You can launch Windows binaries directly from the WSL terminal to interact with your files:
Open Windows File Explorer in the current directory:
explorer.exe .Open a file in Windows Notepad:
notepad.exe filename.txtOpen a project in Visual Studio Code (if installed in Windows):
code .
Important Considerations
- File Paths and Slashes: Always use forward slashes
(
/) instead of backslashes (\) when navigating Windows paths in WSL. - Case Sensitivity: Linux is case-sensitive, so paths must match the exact casing of your Windows folders.
- Performance: For intensive file operations (such as
compiling code or running
npm install), store your project files in the native Linux filesystem (e.g.,/home/username/projects/) rather than the mounted/mnt/c/directory for significantly faster I/O performance.