8

I have installed Ubuntu Bash for Windows 10 on my PC, but I cannot find my root directory in which the bash works in. I know that it should be located in

C:/Users/[Username]/Appdata/Local/Lxss

but it's not there. I have verified that my files exist but the directory does not show, even with hidden files shown. Any help would be much appreciated!

muru
  • 197,895
  • 55
  • 485
  • 740

3 Answers3

6

Please DO NOT access the Linux filesystem from Windows: Read this for more info: https://blogs.msdn.microsoft.com/commandline/2016/11/17/do-not-change-linux-files-using-windows-apps-and-tools/

We are working on improving filesystem interop in future releases, but for now, if you want to share files between Windows & Linux, store the shared files in the Windows filesystem, and access them from Linux via /mnt/c/...

Rich Turner
  • 1,976
0

I wanted to copy a file from Windows desktop to Ubuntu user directory and I was searching for Ubuntu root directory using Windows file explorer.

Later I realised that Windows folders can easily be accessed from Ubuntu bash.

Windows directories can be found under /mnt/c/Users/YOUR_USERNAME_HERE/

EX: if you want to access desktop then => /mnt/c/Users/YOUR_USERNAME_HERE/Desktop

Later I used cp command to copy files from Desktop to Ubuntu like this:

cd /mnt/c/Users/YOUR_USERNAME_HERE/Desktop
cp filename.ext ~/

~/ => this directly refers to Ubuntu user directory.

Tip: Same thing can be done for moving files from Ubuntu to Windows as well.

Zanna
  • 70,465
-2

This happened to me, because I removed bash and reinstalled it from Windows store.

The work around I used was to create a shortcut of

C:\Users\user\AppData\Local\lxss

and pasted it into

C:\Users\user\AppData\Local\ 

Now my applications on Windows (such as Atom) can access project files made from Ubuntu bash.

Zanna
  • 70,465
  • 1
    Please DO NOT access the Linux filesystem from Windows: Read this for more info: https://blogs.msdn.microsoft.com/commandline/2016/11/17/do-not-change-linux-files-using-windows-apps-and-tools/ – Rich Turner Sep 07 '17 at 19:44
  • A better way would be to push your Ubuntu work into a Windows directory for your other applications to access. – WinEunuuchs2Unix Oct 07 '17 at 23:57