Knowing how to access Windows files from WSL makes it easier to use Linux command-line tools on documents, code, and other files stored in Windows. Windows can also open files in your Linux distribution through a special WSL share.
The paths depend on which side you’re using. Windows drives usually appear under /mnt in WSL, while Windows reaches Linux distribution files through a network-style path. Here’s how to find both locations, work with files safely, and choose where to keep a project.
How to access Windows files from WSL
In a typical WSL setup, Windows drives are mounted under /mnt in the Linux file system. The Windows C: drive is usually /mnt/c, D: is /mnt/d, and so on.
For example, a Windows user profile at C:UsersAvery is commonly available in WSL at /mnt/c/Users/Avery. To open that folder in a WSL terminal, run:
cd /mnt/c/Users/Avery
Replace Avery with your Windows account folder name. To check which drives are mounted, run:
ls /mnt
To list files in a folder, provide its path. For example:
ls /mnt/c/Users/Avery/Downloads
For names that contain spaces, put the path in quotation marks or escape each space with a backslash:
cd “/mnt/c/Users/Avery/My Documents”
Or use:
cd /mnt/c/Users/Avery/My Documents
Once you’re in the right directory, Linux tools can work with the Windows files there. You might search text files with grep, inspect a directory with find, or edit a script with a command-line editor. A command such as cp can copy files, while mv can move or rename them. Take care with commands that modify or remove files: they affect the Windows files at that location, too.
When a command reports that a file can’t be found, check the path one part at a time. Use pwd to see your current directory, then run ls on the parent folder. Linux paths are case-sensitive in many common situations, so Downloads and downloads may not refer to the same directory.
Convert paths between shells
Windows and Linux use different path formats. WSL includes wslpath to convert between them. To convert a Windows path to a WSL path, run:
wslpath -u ‘C:UsersAveryDownloadsnotes.txt’
To convert a WSL path to Windows format, run:
wslpath -w /mnt/c/Users/Avery/Downloads/notes.txt
Path conversion is useful when a script or command expects a path from the other environment. For example, you can convert a file location before passing it to a Windows command-line program. You can also open the current WSL directory in File Explorer by running:
explorer.exe .
Run the command from the directory you want to view. The period stands for the current directory. To open a specific folder instead, change to it first with cd, or provide its path to Explorer.
Open WSL files from Windows
Windows can browse files in a WSL distribution through File Explorer. Enter this path in its address bar:
\wsl.localhost
You should see your installed distributions. Open one, then browse to a location such as home and your Linux username. For example, a project might be at \wsl.localhostUbuntuhomeaveryprojectsdemo.
The distribution name in the path must match the name installed on your computer. To see the available names, run this command in PowerShell or Command Prompt:
wsl –list –verbose
Some systems also accept the older path format, \wsl$Ubuntu. If one format doesn’t open, try the other and substitute your distribution’s name. You can also run explorer.exe . from a WSL terminal to open the current Linux directory in File Explorer.
Use the WSL share to inspect or edit files in your Linux home directory with Windows applications. For example, a Windows text editor can open a project under /home/avery/projects. Save changes as usual, then return to WSL to use the updated files. The Windows path and Linux path point to the same files, so you don’t need to copy them between locations just to switch applications.
If you use a Windows application’s Open dialog, you can enter the WSL share path in its filename field or browse to the distribution in File Explorer first. Some older applications may not handle network-style paths well. In that case, try a current version of the application or use a tool that supports WSL paths.
Choose where to store a project
Both environments can access each other’s files, but a project’s main file system can affect how smoothly its tools work. A practical rule is to store a project where the tools that use it most often run.
- Mostly Linux tools: Keep the project in the WSL distribution, such as /home/avery/projects/site. This is generally a better fit for Linux development tools and workflows.
- Mostly Windows tools: Keep the project on a Windows drive, such as /mnt/c/Users/Avery/Projects/design.
- A mix of tools: Choose based on which environment performs most of the file operations. Occasional access from the other side is usually straightforward, but frequent cross-environment work calls for a deliberate choice.
Opening Linux files from Windows through the WSL share is different from keeping a Linux project on a Windows drive and accessing it through /mnt/c. Linux tools working across the Windows-to-Linux mount may encounter slower file operations. This can matter for build tools, package managers, and version-control commands that touch many files.
For a Linux-focused project, keeping source files in the Linux file system can also help avoid surprises with Linux permissions and file-name behavior. For a Windows-focused project, a Windows drive is often more convenient for applications that expect regular Windows folders. The occasional command run from the other environment is usually fine; the main concern is making one side do repeated work across the boundary.
If Windows applications are the main way you open and manage a project, keeping it on a Windows drive is simpler. Linux can still reach it at /mnt/c. Avoid maintaining separate copies and moving changes between them unless you have a clear reason. It’s easy to edit one copy and overlook changes in the other.
Understand permissions and file changes
Files under /mnt/c are on a Windows drive, so Windows permissions still apply. Linux commands can read and modify many of these files, but permission details shown by commands such as ls -l may not behave exactly as they do on a native Linux file system. Don’t assume that changing a mode with chmod has the same effect as it would on a file in your Linux home directory.
Files in the WSL distribution use Linux file-system behavior. Windows can reach them through the WSL share, but use that supported access path rather than trying to find or edit the distribution’s internal storage files in Windows system folders. Directly changing those internal files can damage the distribution.
When both environments access a shared location, they’re working with the same files. If a Windows application has a file open while a Linux command changes it, the application may show outdated content or handle the change unexpectedly. Close the file in one application before making substantial changes from the other, especially for databases, build outputs, or files that may be locked.
Be particularly cautious with commands that remove or overwrite files. Before running a command such as rm, git clean, or a script that writes generated output, confirm the current directory with pwd and review the target path. A mistaken path under /mnt/c can affect personal Windows files, not just project files.
Troubleshoot missing drives and paths
If /mnt/c is missing or empty, check that the drive is visible in Windows and that WSL is running normally. In PowerShell, you can restart WSL by stopping its virtual machine and opening your distribution again:
wsl –shutdown
This stops running WSL distributions, so save any work in Linux applications first. Start the distribution again, then check ls /mnt. If you use custom WSL settings, review /etc/wsl.conf inside the distribution for automount options that may change how drives are mounted. Change the configuration only if needed and you understand the effect.
If a Windows share path won’t open, verify the distribution name with wsl –list –verbose. Also confirm that the distribution is installed and has been started at least once. A typo in the distribution name or Linux username can make a path appear unavailable. If a folder is private to a particular user, check that you have permission to access it.
For shell commands involving spaces, quote the full path. Use pwd to check your current location and ls to list directory contents. To get a Windows-style path, run wslpath -w rather than guessing where the backslashes go. These checks usually reveal whether the problem is a spelling error, an unexpected current directory, or a drive that has not mounted.
