-
Notifications
You must be signed in to change notification settings - Fork 855
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIndows directory of the linux subsystem #402
Comments
It's located under |
What I mean is the subsystem path in the C directory. I want to access the subsystem path in WIndows Explorer. |
My mistake. |
Under DON'T CHANGE ANYTHINK INSIDE! SERIOUSLY! 🚨 Access Windows files via EDIT: symlinks are suported since 14342. |
@ducminhnguyen -- copying directly into the Linux subsystem from Windows is not supported, according to discussion on other tickets. There is a directory under AppData somewhere (I forget where) that appears to contain the files for the WSL filesystem. But if you put new files there, or modify existing files there, your changes are not reflected correctly inside WSL. My best guess is that Linux needs to store different metadata (and more caching information, etc, since its disk-buffering model is also different) about its files than Windows does, and that this is currently implemented by storing the master copy of the structure of the Linux filesystem in a database of some sort, and just using the Windows filesystem as a convenient BLOB-store for that database. If you really need to do this, a workaround would be to write a drag'n'drop Alternatively -- could you put your files in a Windows directory and, within WSL, do "cd ~; ln -s /mnt/c/path/to/my/files" to make them appear to be in your WSL homedir? |
Are there any best practices around file storage when installing tools or programs that you want to be available in the wls? |
As of 1611, |
What if someone is trashed his Ubuntu subsystem and wants a fresh start? Is it safe to remove |
If you want a fresh start use lxrun.exe /uninstall /full Reinstall by running bash.exe when that completes. |
Thank You! Meanwhile I already found out this in the documentation. I'm using these commands: # Windows folder:
# C:\Users\[user]\AppData\Local\lxss
# Uninstall with keeping root dir
# lxrun /uninstall
# Uninstall completely:
# lxrun /uninstall /full /y
# New install (root user created):
# lxrun /install /y Is there any way to make a backup from an actual state (like before package installs)? If I zipping the |
Only lxrun.exe can create that folder. It's a special folder with Extended Attributes so copying it manually won't work.
After finishing installing there will be lxss and lxss.base folders. If you want to use the "lxss.base" folder you just have to rename it back to lxss before launching bash. |
So what you saying is For creating a new dev environment, I use a massive shell script, which is not nice, but I think this is the nearest let's say for a Dockerfile. For a dev environment, BashOnWindows is great, but reading from so many people how many times they recreating this from scratch (including me), I definitely not want to store any database inside WSL. EDIT: Nope, you have to put the entire If this file system so restricted and basically you cannot do anything inside it from Windows, why not packaged into a VHD(X) on the first-place? For maintaining it would be much better. |
lxss can't be a symlink anymore since build 14388. It will install but at launching bash it will show error 0x80070003. Before that it was easy attaching a VHDX file to the lxss folder for example. Anyway Microsoft knows about this problem and they are already thinking about different solutions. Windows 10 Image System backup can create an image of the entire system drive with lxss folder and its attributes intact but of course it will be a huge image file that also contains Windows. |
is there a way to change the windows folder into which lxss installs ? my c:/ is running very low on space, I am trying to move all my stuff on to my d: |
Hi, I use Win10 and went to |
It is marked as system as well. Keep in mind you should not modify anything in that directory. |
@benhillis use command line to access it. Or type it in the address bar |
@partially-applied - I don't follow your comment. I'm just warning people that they should not do it. |
I agree with @benhillis. Don't edit files there or add new ones (it wouldn't be visible/accessible from ubuntu anyway). Access to that folder should be read-only. |
@partially-applied I think you meant to mention @Benosika. Thank you so much for this, I was going crazy over why I couldn't see this folder and the whole internet seemingly disagreeing with me on the existence of it. |
how do I get a windows program that requires node.js to use the wsl installed version? :) To clarify I have node installed in wsl and would like my windows programs, like sublime text to see it. It needs it to run prettify js amongst other things. |
Folks here may have suggestions (I know this is discussed on other tickets and others have made it work in some cases), but you might also want to ask the Sublime developers. Linux interpreters may have behavior or features that are different from their Windows counterparts, so a really feature-complete integration would require them to know to use the interpreter's Linux interface. |
@aseering I have commented on the Sublime issue today. |
One option would be to install nfsd and export the rootfs on ubuntu, then you'd need to activate client for nfs under programs & features, configure the service and launch it.. well, you obviously need to know how to get the nfs daemon configured as well but there's plenty of documentation online for that. I have toyed around and got apache2 with PHP and MySQL running, you just have to manually start the services and then remember to shut them down before you exit or you could have some database corruption... but that's entirely unrelated =) UPDATE: I gave it a shot, it doesn't work because the ubuntu kernel doesn't support it |
I have win10 Build 16241 , with ubuntu installed through the "store", and the |
@f0ster - Each distribution you install through the store is installed to that application's appdata directory. For example: |
I'm using the linux subsystem in windows 10 with ubuntu installed |
@AdrielleKiz - Try "ls /mnt/<system drive>/Users/<user name>/Desktop" |
@sunilmut Thanks ! |
@benhillis lifesaver |
when I copy/move files in my home directory using the explorer, the changes aren't reflected in my terminal. Anyone know how to solve this? |
@r3lik , you are now allowed to do that. You should access that folder in a read-only scope. |
@davidalbertonogueira it wasn't working for me when I wanted to edit things in |
Changing your home variable like that is strongly not recommended @r3lik. Why don't you just copy your files from inside WSL as recommended in the docs? |
I can't answer for him @shawnz but I can say that at least for myself it's a pain in the ass. Learned a lot of Linux stuff using WSL, now I'm starting to think that I should just go fully Linux and drop the windows thing all together, haha |
Would it make more sense to point to lxss than lxss/rootfs? from lxss/ can access /home directories and the such, though I remain wary of testing read/write through windows. I'll probably stick to copying stuff from linux to /mnt/c/Users/user/ for the time being. |
lxss does not exist in AppData.... |
The lxss folder with wslhost.exe is located at: bash.exe comes from: The rootfs for WSL's are located at: Ubuntu:
access via explorer.exe: KALI:
access via explorer.exe: Debian:
access via explorer.exe: |
This comment has been minimized.
This comment has been minimized.
it is work!!! |
@AndrewBogdanovTSS - you are using WSL2 which stores the files on an ext4-formatted vhd. |
So how than files can be viewed in WSL2? |
I cant find the windows path of the linux subsystem which is inconvenient as I want to copy files into the directory from windows.
The text was updated successfully, but these errors were encountered: