1

On a Windows running computer, can we access files stored on the computer via the WSL (Windows Subsystem for Linux) ?

For example I'm using the Ubuntu WSL version on my Windows 10 computer. Using Ubuntu WSL, can I run a cat command on a text file stored in My Documents on the C: disk ?

Nicryc
  • 765

1 Answers1

2

In modern versions of Ubuntu WSL, Windows system drives are mounted under /mnt/ on the Linux filesystem. e.g. C:\Users\test\test.txt --> /mnt/c/Users/test/test.txt

If you wanted to cat out a file stored under C:\[USER-NAME]\Documents\[FILE-NAME], you could run cat /mnt/[USER-NAME]/Documents/[FILE-NAME] in WSL.

ifconfig
  • 697