5 ms·
Last time I tried to use the Windows Subsystem for Linux it was a mess. I thought I could access my files from windows and messed all the filesystem. Now it l
by neves 10y ago
Last time I tried to use the Windows Subsystem for Linux it was a mess. I thought I could access my files from windows and messed all the filesystem.
Now it looks like I can freely exchange my files between the WSL and Windows. Is it true?
Do I finally have a linux inside a windows machine where I can install things using apt-get (instead of cygwin setup.exe)?
When will it goes into the official Windows 10 version?
- Stubb 10y agoYour Windows drives appear under /mnt/c, /mnt/d, etc. in WSL. So your Windows home directory is /mnt/c/Users/ffoobar. You can easily read/write Windows files from Linux, but I don't think you can do the opposite. I've used git within WSL to drive a repo on my Windows drive. WSL gives you full-blown Ubuntu 16.04 where you manage packages with apt-get. You have to look close to the bare metal to see differences. Until the creator's update, for example, ifconfig didn't work. Earlier today, I compiled and ran some OpenMP-based code in WSL and it happily detected all the cores on my dev machine and kept them busy with worker threads. Pretty cool!
- neves 10y agoI thought it would give me total interoperability. That I could edit an movie in a windows app, run it through ffmepg, and go back to editing. Cygwin is still useful.
- wvenable 10y agoIt does but you have to do that from the Windows file system not the Linux one. So from Linux you are accessing /mnt/c/Users/you/somedocument and from Windows it's C:\Users\you\somedocument.
- neves 10y agoBut isn't this a new thing? I believe you couldn't do it in the initial versions.
- wvenable 10y agoNo, it's always been that way from the initial release. It's literally the only file system interopt that exists. You're not supposed to access the Linux filesystem from Windows -- it's in a system hidden area of your profile but some people still tried to mess with it with unfortunate consequences.
- steveklabnik 10y agoPreviously, if you read Linux files from Windows, it would brick the lxss entirely. The bug report I filed suggested that this was being fixed soon.
- bmon 10y agoIt's already on the stable Windows 10 build a, and there was also significant improvements in the creators update. You have to enable it via "Windows Features" and reboot before first use.
- jug 10y agoI wonder about this too. I know that apt-get works since earlier instead of the terrible Cygwin distribution model, but yes, IIRC there are NTFS streams being used for the Linux file system metadata IIRC and if these get overwritten or somehow modified things go bad. And NTFS streams being a somewhat uncommon NTFS feature, some applications don't handle them well? On the other hand, wasn't a new Windows 10 Creators Update feature that you could now indeed edit the files from Windows, and not just from the Linux subsystem? And that the Linux tools such as web servers are now even notified when the files change so they can reload them automatically? I'm not sure how they solve the metadata borking issue though, in that case.