- 1 year ago
Open unix style paths "/mnt/c/..." on Windows 10 with linux subsystem
On Windows 10 with the Windows Subsystem for Linux (WSL), you can open Unix-style paths (e.g., "/mnt/c/...") from the Windows file explorer or the command prompt by using the WSL path convention.
To open a Unix-style path on WSL from the Windows file explorer:
- Open File Explorer (Windows Explorer).
- In the address bar, type
\\wsl$
and press Enter. This will show the available WSL distributions. - Navigate to the appropriate distribution folder (e.g.,
Ubuntu
,Debian
, etc.). - Continue navigating through the directories using the Unix-style paths.
For example, to open "/mnt/c/Users/YourUsername/Documents" on WSL, you would navigate to \\wsl$\Ubuntu\mnt\c\Users\YourUsername\Documents
.
To open a Unix-style path on WSL from the Windows Command Prompt (CMD) or PowerShell:
- Open CMD or PowerShell.
- Use the
wsl
command to switch to the desired WSL distribution.
For example, to change to the Ubuntu
distribution, run:
bashwsl
- Once you are in the WSL shell, you can use Unix-style paths as usual.
Remember that the WSL mounts the Windows drives under the /mnt
directory. So, the "C:" drive on Windows will be accessible as "/mnt/c/" on WSL, "D:" drive as "/mnt/d/", and so on.
By following these steps, you can easily work with Unix-style paths on Windows 10 with the Windows Subsystem for Linux.