How to transfer a file between Windows and WSL

This article was published on Aug 28, 2021

While using WSL (Windows Subsystem for Linux) on Windows 10 (or 11), we might want to move a file we just downloaded and move to our Linux environment.

I remember when I first installed it (about 1 year ago) this task were easier: we could simple have access to all files but now, it seems MS team have made this a bit difficult by "mounting" the subsystem in a hard drive unit and locking it with permissions.

Anyhow, I've found that inside WSL, we have our hard drivers mount inside a folder called /mnt:

$ ls /mnt

c  d  wsl

c and d are my HDs.

In other words, I can copy something from my Download folder on Winders by simply access it from my WSL:

cp /mnt/c/Users/Raul/Downloads/a-file.zip ~/

Resources