2

I just installed the Linux subsystem for Windows and one of the first things I tried was to edit my .bashrc which is located at /home/user in file system of the Linux subsystem, or C:\Users\user\AppData\Local\lxss\home in plain Windows. I did so using a Windows program.

After I saved the file, whenever I start bash I get an input/output error related to /home/user/.bashrc and ls no longer lists .bashrc as it used to.

Furthermore, I noticed that when I create new files using Windows programs in C:\Users\user\AppData\Local\lxss\home, they don't show in the output of ls ~. Conversely, it works as expected: whatever I do in /home/user using bash, it's properly shown in C:\Users\user\AppData\Local\lxss\home.

I was under the impression that /home/user and C:\Users\user\AppData\Local\lxss\home were the same directory which could be manipulated in either the Linux subsystem or Windows. Is it not so?

Thank you!

  • What is the exact error you see? Can you see the files listed if you run ls -al? It maybe that editing the files via Windows is messing up the file permissions. – RobertKenny Oct 13 '16 at 9:34
2

No, it is not the case.

It is the expected behavior with Windows on Linux.

Linux file system requires additional metadata that Windows does not understand, you are not supposed to access the files in the lxss directory via Windows.

This Microsoft blog post goes into a bit more detail.

  • There are many workarounds and solutions in the corresponding issue report in Github. – Jaime Jul 29 '18 at 5:52
  • @Jaime Yes, in the last two years there have been a lot of changes to WSL and what can be done. – RobertKenny Aug 17 '18 at 17:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.