Let’s say you want to copy or move files from a Windows drive into your WSL instance. You could use
/mnt/c/path/to/file from within WSL, e.g.:
cd $HOME mv /mnt/c/Users/youruser/Documents/project/myproject .
Another way is to access the WSL instance’s drive from the outside.
- Navigate to
\\wsl$\Ubuntu-20.04\home\your_usernameand drop the files there
Please note that WSL prohibits access to any root-owned files or directories through the
- Create a directory under root
chownto your user:
sudo mkdir /project sudo chown $USER:$USER /project
You should be able to drop into that folder as well.