Ubuntu – How to use win explorer to create folders for Bash on Ubuntu on Windows

bashwindows-subsystem-for-linux

How can I use the Windows Explorer to create folders or files in my home directory using "Bash on Ubuntu on Windows"?

I tried the following:

  1. Enter C:\Users{user}\AppData\Local\lxss{username} in the Windows Explorer
  2. Create a folder named "scripts" using Windows Explorer
  3. Open Bash on Ubuntu on Windows
  4. Run ls -a

RESULT: total 0

Are there any plans to make something like this work?

P.S. Workaround-ish:

  1. I used mkdir & touch in bash to create folders & files e.g. scripts/menu.py
  2. I used the Windows Explorer & Notepad++ to edit menu.py
  3. I ran the script with python scripts/menu.py

Best Answer

We STRONGLY recommend against modifying any Linux files/folders from Windows in the manner described above: Doing so will likely result in data loss and/or corruption:

There's a reason we made the lxss folder hidden and system ;)

It's fine to access Windows from Bash/Linux, but we've not yet done the work to persist and manage Linux file permissions & metadata when accessing files under .../lxss/ using Windows tools & apps.

[2016-11-17: Update] To expand on this question and its answer, I wrote-up a more thorough explanation here: https://blogs.msdn.microsoft.com/commandline/2016/11/17/do-not-change-linux-files-using-windows-apps-and-tools/