Windows Linux Subsystem - Accessing Files outside of Ubuntu
I'm not sure if I'm misunderstanding your question, but your ubuntu bash (top right window) should have access to your Windows-based disks under /mnt
. For example, on my machine /mnt/c/Users/Scott/Desktop
is my Windows desktop and I can read/write files there from vi for ex. I don't believe the opposite is true just yet. That is, I don't think you can explore into your bash world from Windows explorer.
What I've been doing as a developer is to host projects on my d: and point the linux-based tools to that /mnt/d/projects/someproject/
folder.
Make sure you update your Windows builds periodically as they seem to be fixing a lot of issues with each build, especially around sym-links and crossing FS boundaries between Linux/Windows.
@scottt732 answered beautifully.
Just a tip for developers who would work in Windows and would like to access those files in Linux Subsystem real quick. You can use symbolic links.
For example If you are working on a project in d:/projects/web-project
, you can create a symlink at location /var/www/web-project
and all the files you change in windows will be readily available to be accessed in Linux Bash.
For this you will do use ln
command like this
ln -s /mnt/d/projects/web-project /var/www/web-project
In above line /mnt/d
was meant to be your d drive on windows. Setup your Apache virtual host to this path and you are ready to go.
We recommend that you do not copy/create/update Linux files using Windows apps.
Instead, store files in the Windows filesystem (e.g. c:\dev\project
) that you want to edit files using Windows tools and/or build/test/run using Linux tools/runtimes/platforms (e.g. via /mnt/c/dev/project
).
In your specific scenario, if you want to copy your Cygwin files into Bash, then open Bash and copy the files from your Cygwin folder on C: into ~/
, like this: cp /mnt/c/Users/dave/Documents/Cygwin/* ~/
)
HTH.