6 ms·
File System Improvements to the Windows Subsystem for Linux
- revelation 9y agoI wonder if they have plans to add other emulation features, most importantly the ability to passthrough USB devices (or even graphic cards?). I don't need or want the Linux graphical interface of my VM, it's pretty much redundant, but I do need to make devices available to the Linux software. Otherwise it's a bit like emulating a microcontroller - sure, Turing says the thing can compute everything, but in a very practical sense it can do absolutely nothing without it's outside inputs and periphery. I need the damn side-effects!
- hermitdev 9y agoThey did recently add support for standard serial devices[1]. I'm not sure if this support extends to USB or what any such timeline looks like. [1] https://blogs.msdn.microsoft.com/wsl/2017/04/14/serial-support-on-the-windows-subsystem-for-linux/ https://blogs.msdn.microsoft.com/wsl/2017/04/14/serial-suppo...
- revelation 9y agoIt does seem to work with USB serial devices, but only because those drivers on windows in turn emulate a serial port. So we have the USB driver pretending to be a serial port to Windows pretending to be a TTY to the Linux subsystem. It's a bit silly, but then I imagine TTY is a whole lot easier to emulate (even with all the cruft on that) than a USB chipset.
- hermitdev 9y agoTangential, but there was a recent HN article (I think) (that for the life of me I cannot find a link to) that referenced a Microsoft DSL for describing finite state machines that was principally developed to implement MS's USB driver. Closest link I could find (which is not the correct one) is: https://www.microsoft.com/en-us/research/project/model-based-testing-with-specexplorer/ https://www.microsoft.com/en-us/research/project/model-based...
- cesarb 9y agoPerhaps it was this one from 13 days ago, about Prolog and Windows NT network configuration? https://news.ycombinator.com/item?id=14046420 https://news.ycombinator.com/item?id=14046420
- hermitdev 9y agoNo, that wasn't it.
- comfydragon 9y agoP? https://news.ycombinator.com/item?id=12673739 https://news.ycombinator.com/item?id=12673739 (Only took me about twenty minutes of assorted searches to find it too...)
- ajross 9y agoSeems like you might be better served with a linux desktop and windows in a VM then. The use case for WSL right now is someone like a web developer. They can develop and debug node apps locally in their native environment.
- revelation 9y agoThat only works because they provide emulation for AF_INET, AF_UNIX and AF_NETLINK sockets. It's not an automatic freebie.
- ajross 9y agoI understand. Nonetheless they did to the work to enable straightforward client networking (which works because Windows' own networking layer is basically Berkeley sockets under the hood). Writing an emulation of the Linux USB sysfs and device node API on top of Windows' very different USB driver layer is a rather bigger task. I'm sure they'll get to it eventually, but it's not something you can demand as an "obvious" feature.
- josteink 9y ago> That only works because they provide emulation for AF_INET, AF_UNIX and AF_NETLINK sockets. It's not an automatic freebie. To be pedantic, Microsoft is actually emulating the whole lot. You're not running a Linux-kernel on your Windows-machine.
- gravelc 9y agoWorks great for bioinformatics too. I've exited the Apple world (high prices etc.), and don't miss much now. No longer have to modify Powershell to make it more Unix-like. Jupyter notebook works fine, so I'm happy. No more bother with dual booting either; Ubuntu is gone as well.
- Stubb 9y agoIt's funny how Windows 10 is rapidly becoming a better Unix than MacOS since everything that matters runs Linux.
- ungzd 9y agoDoes it suffer from similar quirks as Cygwin (.exe suffix removal, symlinks, permissions mapping)? - https://cygwin.com/cygwin-ug-net/using-specialnames.html https://cygwin.com/cygwin-ug-net/using-specialnames.html - https://cygwin.com/cygwin-ug-net/using.html#pathnames-symlinks https://cygwin.com/cygwin-ug-net/using.html#pathnames-symlin...
- hermitdev 9y agoIn my experience, no. They only just recently added support for executing apps between environments. Executing Windows apps from the bash shell can be surprising: $ notepad The program 'notepad' is currently not installed. You can install it by typing: sudo apt install wine1.6 $ notepad.exe (Note Pad is launched) $ /mnt/c/Windows/System32/notepad.exe (Note Pad is launched) In the latest builds symlinks no longer require administrator permissions. Don't know what you're referring to in regards to permissions mappings, but know that the Windows' permissions always trump whatever your see from chmod/ls -al
- sengork 9y agoCygwin (64bit) didn't work for me in the latest creators update (actually I think it broke even before that). Now I am trying things using WSL itself, so far it has been a productive move. File permissions and security descriptors proved to be quite a hassle when removing Cygwin requiring multiple takeown and cacls hacks to remove some of the files. On the flip side I saved some disk space too.
- barrkel 9y agoOTOH when I wanted to have pretty pictures on my lock screen but without the Microsoft ads, I needed to rely on Cygwin to blow away the folder that caches the pictures deep in ProgramData/.../SystemData/*/ReadOnly - the lock screen image setting API has a lot of bugs. Without Cygwin, I was fiddling with cacls and takeown in an elevated prompt trying to blow away the folder. An elevated Cygwin prompt and it was just rm -rf. (Bugs: https://www.google.co.uk/search?q=lock+screen+windows+10+images+broken https://www.google.co.uk/search?q=lock+screen+windows+10+ima...)
- corysama 9y agoI haven't dug deep into it yet. But, I'll say that I've been having fun compiling (command line) Linux apps with Clang and visually debugging them with GDB all through the UI of VStudio Community Ed and without a VM. /shill mode Linux is not a target for the code I'm working on. But, I like to keep my code as cross-platform as possible. Between this setup and prototyping code on several compilers via goldbolt.org, staying standard-compliant and compiler-agnostic is much easier than ever before.
- mjevans 9y agoI was going to make another comment, but just found out while searching that WSL is //supposed// to be based on Ubuntu (20)16.04 now (instead of 14.04) I guess the next time I work with those systems I'll have to run down some upgrade / re-install directions. I wonder if that will fix the issue where I was unable to mv folders around the c:\ drive within the /mnt/c FS. (It more or less locked up to the point that I had to restart to clear the issue.)
- JoBrad 9y agoFWIW, I haven't had any issues moving files before or after upgrading from 14.04 -> 16.04. I use Git in WSL, but interact with the files in both Windows and WSL without any special considerations.
- mjevans 9y agoWith the updated WSL version out I probably won't ever run across the issue again. I can't remember the exact circumstances, I may have had the folder open in a window or something (thinking of it, Windows doesn't let you rename files out from under processes, which may have been the reason). However I do recall that trying to ctrl+c kill it didn't work. I don't recall what else I had/hadn't tried; I was rather busy at the time and couldn't stop to make a proper bug report. All that mattered to me was that it completely stalled for no transparent reason and my best option was to just not even try to do real file management from the WSL environment.
- WorldMaker 9y agoIt's mentioned in the release notes blog post: https://blogs.msdn.microsoft.com/commandline/2017/04/11/windows-10-creators-update-whats-new-in-bashwsl-windows-console/ https://blogs.msdn.microsoft.com/commandline/2017/04/11/wind... You can do the traditional Ubuntu do-release-upgrade to upgrade your install, or the suggestion is to replace and reinstall (from PowerShell or cmd): lxrun /uninstall /full /y lxrun /install I copied my few dotfiles to a safe place and did that.
- urbanxs 9y agoNot this crap again
- NelsonMinar 9y agoNetwork filesystems! That's the last big feature I've been needing for regular use of WSL for light tasks. There's still enough weird behavior I wouldn't look at WSL as a complete Linux replacement, but it sure is a lot nicer than Cygwin/msys2. They don't say anything about FUSE, I wonder if this work is at all related?
- eVeechu7 9y agoI am pretty sure this update does not add FUSE support. FUSE would add the ability to use SSHFS, which is the network file system support I'm interested in. If FUSE would be useful to you, please vote for it at https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/13522845-add-fuse-filesystem-in-userspace-support-in-wsl https://wpdev.uservoice.com/forums/266908-command-prompt-con...
- laumars 9y agoThere is a Windows-native SSHFS client[1]. I have it installed on a Win10 VM so can confirm it "works" albeit I haven't needed to use it for anything so cannot confirm how well it works. [1] https://github.com/Foreveryone-cz/win-sshfs https://github.com/Foreveryone-cz/win-sshfs I think is the currently maintained version but you're welcome to confirm that independently.
- noen 9y agoI helped resurrect this to support Windows 10 a year or so ago. It works, but because of its reliance on Dokany (a FUSE-like usermode file system library), there are a lot of ways it still doesn't work perfectly. It was a lifesaver for me when I was doing development on embedded Linux devices (Pi/Edison et al). But if you're not tied to remote hardware, WSL is an infinitely better, faster, much more reliable dev process. The biggest issue I ran into with win-sshfs was its tendency to bodge git repo status if you maintained the repo on the mapped folder.
- Rondom 9y ago
- neves 9y agoLast 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 9y 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 9y 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.
- p2t2p 9y agoJava still doesn't work properly though =(. "mvn clean package" on one of corporate projects takes about 5 to 8 minutes in native java on Windows or Mac and it takes more than one hour in WSL. I had so much hope for WSL that I would finally have only ONE device (surface), but no, we're not there yet.
- wbkang 9y agoWelp I mean, with Java, you at least have an option to compile from Windows (given that you can call out an Windows executable from WSL now)
- kristianp 9y agoSorry, I have to ask. Why do you need to use Java with WSL? Native methods?
- hiram112 9y agoI would love this because I still want a 'real' shell when dealing with Java - things like emacs, grep, find, etc. Cygwin and using shared VM directories has too many glitches with things like npm, links, file system endings, etc. As Docker becomes more important, this gets even worse. Really, developing on a Mac is just so much better than both Windows and Linux, even for Java.
- milesrout 9y agoBut why not just use Linux?
- p2t2p 9y agoWe have a build system which is built around maven with *nix only in mind. It does a lot of handy stuff and 99.999% people in company are on macs, I just wanted to have one device instead of two so I was trying to use surface. I keep trying it like once or twice a year and then back to my Mac + iPad + Apple Pen mainly because of that. I also tried to run Linux in hyper-v and use shared directories but io perforce is quite poor in this case too.
- egl2018 9y agoDoes WSL work on Windows Home, or does it require Pro? Is this an accident or by design?
- hungys 9y agoThe screenshots in official installation guide are Windows 10 Home edition. https://msdn.microsoft.com/zh-tw/commandline/wsl/install_guide https://msdn.microsoft.com/zh-tw/commandline/wsl/install_gui...
- richard_todd 9y agoDefinitely works on Home. Source: the laptop I'm using as I type this.
- Filligree 9y agoWhat would be a good X11 server to use? Are there any that support the full stack? (shm, glx, etc.)
- jmspring 9y agoI work for the company, mostly use a Mac, sometimes use X11, and started laughing when I read X11 server on WSL/Linux on Windows. Things have come a long way. I don't know if there is X11 support, but when I have some time later this week, I am going to look based off this question and see. I'm having visions of Hummingbird Exceed from back in the day at the moment. I'm not being flip, I'm actually curious as well and will try figuring out when I have a spare few moments.
- josteink 9y ago> What would be a good X11 server to use? Are there any that support the full stack? (shm, glx, etc.) I recall using exodus in the past (at uni), but it's commercial (pricey). Not to mention these days it seems to be Mac only. From similar threads I've seen recently, and quick searching, it seems Xming is the preferred Windows-option these days: https://sourceforge.net/projects/xming/ https://sourceforge.net/projects/xming/
- saboot 9y agoThe free version of Xming does not implement several things properly. Not sure which but some applications haven't run properly. There is a charityware version but I can't find my license for it. MobaXterm is another free version, It's a term emulator with an X11 server, but you can just turn it on and ignore the term. It runs all the applications Ive found that the free Xming cant.
- gegenschall 9y agoHaven't used LXSS in a while but my X11 of choice for Windows was VcXsrv: https://sourceforge.net/projects/vcxsrv/ https://sourceforge.net/projects/vcxsrv/ Just export $DISPLAY to :0 (AFAIK) and you're all set.
- tkubacki 9y agoIn a way Balmer was right -"Cancer" is eating Windows :)
- tempay 9y agoI assume this is a reference to something?
- eugeneionesco 9y agohttps://www.theregister.co.uk/2001/06/02/ballmer_linux_is_a_cancer/ https://www.theregister.co.uk/2001/06/02/ballmer_linux_is_a_... Unbelievable how much M$ changed for better in the last years!
- oblio 9y ago16 years is quite a few "last years" :)
- tkubacki 9y agoIn a way Ballmer was right -"Cancer" is eating Windows ;)
- nialv7 9y agoWindows subsystem for Linux? Or the Linux subsystem for Windows? These names are confusing...
- Animats 9y agoMicrosoft also has an Android emulator for Windows.[1] One would think that would run into licensing problems. [1] https://www.visualstudio.com/vs/msft-android-emulator/ https://www.visualstudio.com/vs/msft-android-emulator/
- laumars 9y agoSorry but I'm not sure I understand your point? Android is Apache 2.0 with the Linux / GNU parts retaining their respective GPL licence. Microsoft are distributing the OS for free, which is allowed within the terms of Android's licencing and something that is done by many other organisations including Google themselves.
- eriknstr 9y agoI suppose it might be named that way due to trademark conserns. Naming something as "X for Y", where "Y" is a trademark owned by someone else is often done, but I haven't seen "Y for X". Just speculating.
- skrebbel 9y agoIt's confusing, but accurate. It's a subsystem of Windows ("Subsystem" is a well-defined term in Windows land, the win32 API is o its own subsystem as well). I wish they had promoted the name lxss more, though. It's short, very googlable, and it's the internal name. The git repo name is even more ridiculous: https://github.com/Microsoft/BashOnWindows https://github.com/Microsoft/BashOnWindows (after all, I had bash on windows for years already)
- zorked 9y agoI was also confused by their ancient product "Windows Services for UNIX", which does not run on Unix. https://en.wikipedia.org/wiki/Windows_Services_for_UNIX https://en.wikipedia.org/wiki/Windows_Services_for_UNIX
- skrebbel 9y agoI wish there was a way to get lxss updates without being a Windows Insider. I turned on Insider on my brand new laptop last summer and it immediately overwrote some vendor-supplied drivers by newer-but-broken ones. Result: no sound. I didn't manage to fix it except through a full reinstall. Now that's exactly the sort of problem you need to prepared for when doing the Insider thing, but it sortof ruins the point. I want to beta test lxss, not Paint 3D or some fancy new device driver release schedule.
- ghshephard 9y agoI'm pretty certain I had WSL running on my system without being a member of Windows Insider. You just need to turn that on if you want to be on the Fast Track...
- JorgeGT 9y agoParent said WSL updates. You can get WSL but in order to get updates like this one you need Insider builds.
- ghshephard 9y agoI thought this WSL update came with creators edition? Unless you mean the fast track WSL Updates, but not the other windows updates - which yes, I agree, would be nice.
- JorgeGT 9y agoNo, this update comes with Build 16176. Creators Update is Build 15046: https://msdn.microsoft.com/en-us/commandline/wsl/release_notes#build-16176 https://msdn.microsoft.com/en-us/commandline/wsl/release_not... So in order to get it you would need to join the Fast Insider ring...
- emptyfile 9y agoWith the Creators update, can you now actually run a postgres service or apache in the linux subsystem?
- ghshephard 9y agoSee: https://blogs.msdn.microsoft.com/wsl/2017/04/11/testing-the-windows-subsystem-for-linux/ https://blogs.msdn.microsoft.com/wsl/2017/04/11/testing-the-... In particular, they run Nginx 1.4.6 with 100% test coverage and postgresql-9.5.3 with 100% test coverage. Oddly (very), they have a few projects, Cassandra, Coffescript that show better test pass rates with WSL than Native Ubuntu.
- simonh 9y agoWSL is really interesting. I switched to the Mac in 2006 but I’ve never really used the fact it’s built on Unix much because it’s so different and frankly outdated comparede to the Linux systems I work on. When I want to do ‘Unixy’ stuff at home I run a Linux VM in VirtualBox. But WSL seems to offer the best of both worlds – a solid mature desktop environment with plenty of well supported professional level apps and an approaching first class Linux environment baked right in. I’m still very happy on the Mac and would miss a lot of Mac specific features and applications, but this is the first thing to happen in Windows Land that’s made me even think of the possibility of wanting to run Windows at home for over 10 years. Edit: What would be the nearest thing to WSL on a Mac? VirtualBox is a bit heavy-weight. Maybe something based on Hyperkit and Docker? https://github.com/moby/hyperkit https://github.com/moby/hyperkit https://docs.docker.com/docker-for-mac/ https://docs.docker.com/docker-for-mac/
- ghshephard 9y agoLikewise - except for me it's been 15 years. Switched over in 2001, and didn't look back. Running WSL creators edition is really a delight. It's not quite there yet - still has a year or two to bake - but the progress is great. They just added serial support yesterday (which is important for a bunch of the linux binaries I run). For the very first time I'm honestly considering sitting down to a Windows System to do work - I never thought I would have said that - I've got * nix in my finger DNA, so powershell, despite being incredibly powerful, just never managed to get into my workflow. But now - It's best of both worlds - solid User Environment + Solid Unix CLI. Even better, it's a linux CLI, which means I get all the apt-get goodness that I've been missing on OS X (which admittedly has a pretty good brew install infrastructure).
- chx 9y agoFor me at least the big problem is malware. Running Arch Linux means I do not need to worry about malware. Ransomware. Crap like that. Yes, I am a reasonably experienced computer user and it's quite unlikely I would click anything "wrong" but not having to worry about a single bad click causing hours of recovery is a big plus. Edit: while I understand downvotes I would be much happier if you'd educate me where I am wrong.
- rebootthesystem 9y agoIs it at the point where one can, for example, use PyCharm to develop Python/Django sites residing in the Windowns file system (say, z:/sites/project_099) while hosting from WSL? Or would it be treated more like a VM that you simply deploy to? We currently run one or more Ubuntu server VM's per machine as needed for local testing. If needs go beyond that, we have physical (virtualized) servers on our network (for example, web and database servers). I can see WSL possibly being good for local development if it can somehow integrate seamlessly with the Windows file system and various tools (PyCharm) can be setup to run on Windows yet talk to WSL. I guess this might be equivalent to running a remote interpreter. Need to think about this a bit. Running a server or two on VMs is pretty clean and painless. On machines with 64 GB of memory you don't even know they are running (from a performance/resource perspective).
- WorldMaker 9y agoYou can cd to /mnt/z/sites/project_099 and work there directly in WSL. Open the same files in a Windows-based text editor. Even use Visual Studio to drive gdb debugging of the Linux process in WSL. I've not done that last bit, but I definitely have moved all my ruby/Jekyll work into WSL and use VSCode to edit.