Unlike previous methods, this is a safe way to work with Linux files! Windows does some magic in the background, making it possible to edit your Linux files from Windows applications without causing file permission issues. You still shouldn’t modify the underlying files at their real location on your system.
Note: It doesn’t matter if you use WSL1 or WSL2. These commands all function exactly the same way.
There are two ways to access your Linux files. First, the easy one. From within the Windows Subsystem for Linux environment you want to browse, run the following command:
This will launch File Explorer showing the current Linux directory — you can browse the Linux environment’s file system from there.
You can also access them directly at a
\\wsl$ path. In File Explorer or any other Windows application that can browse files, navigate to the following path:
You’ll see the folders for all your installed Linux distributions, which are exposed as if they were network shares. For example, Ubuntu 22.04 usually is available at
Feel free to create a shortcut to this folder — for example, you could drag it to the Quick Access section in File Explorer’s sidebar.
Again, you can modify these files normally as if they were any other type of file on your system. Modify files with Windows tools (Notepad even supports Unix line endings!), create new files in the Linux folders, delete files, or do anything else you like. Windows will ensure nothing goes wrong and the file’s permissions are updated properly.
- › What’s New in Windows 10’s November 2021 Update (21H2)
- › Google Pixel Watch Will Add Popular Apple Watch Feature
- › How to Fix Brightness on iPhone When Your Screen Is Too Dark
- › The Pixel 7 Now Has a Free Built-in VPN
- › ChatGPT Is an Impressive AI Chatbot That Can’t Stop Lying
- › Windows 10 Really Wants You to Upgrade Already
- › 7 PowerPoint Features You Should Use During Presentations