8

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
Kaz Wolfe
  • 34,122
  • 21
  • 114
  • 172
  • I believe this issue (bash ubuntu on windows) is out of scope of this forum, I suggest you read this meta question about it. – gwarah Aug 17 '16 at 16:44
  • 1
    hi gwarah. i did a cursory perusal of the meta question. it doesn't seem to me like there's concensus on the matter. I wrote this question because i found "http://askubuntu.com/questions/759880/where-is-the-ubuntu-file-system-root-directory-in-windows-nt-subsystem-and-vice". Also, I just found 9 questions tagged "ubuntu-on-windows" tagged items on this site ("http://askubuntu.com/questions/tagged/ubuntu-on-windows") Love and peace – Joe Codeswell user601770 Aug 17 '16 at 17:46
  • Still, you'll probably get a better answer on SuperUser. – wjandrea Aug 17 '16 at 18:21
  • Make some sense what you said @JoeCodeswelluser601770, and maybe could be better discussed on meta, but for what I could understand, while WSL remains on this limbo, questions about this issue should be post on others forums. I pick a Microsoft FAQ: "What is Windows Subsystem for Linux (WSL)? The Windows Subsystem for Linux (WSL) is a new Windows 10 feature that enables you to run native Linux command-line tools directly on Windows, alongside your traditional Windows desktop and modern store apps.". And as MS Windows feature I understand be better out of this scope. its MHO. – gwarah Aug 17 '16 at 20:32

1 Answers1

10

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/

Rich Turner
  • 1,976