25 ms·
Windows Subsystem for Linux 2 Moving into General Availability
- saagarjha 7y ago> He further mentions that unzipping tarbars could see a 20 times performance increase. Boy, do I love unzipping tarbars! On a more serious note, it’s great that WSL has gotten much faster, although it’s a little disappointing that they threw out the older, more interesting architecture to get it and just used a VM.
- jchw 7y agoI agree wholeheartedly. I know it was probably a fool’s errand especially in a world where Docker for Windows was doing the same thing WSL2 does but worse, but WSL1’s design just satisfied me in a way that Hyper-V will not. Presumably, this also means you have to have Hyper-V enabled, crippling all other VM software. Hope the integration is impressive at least, to hopefully make up for it. I admittedly don’t run Windows these days but WSL is definitely one of the highlights of modern Windows and it’s hard to not follow its progress. I also wonder how integration changes with sockets/networking, hardware access, Windows Firewall, etc. Last I checked, relations with Windows Firewall were strained by the lack of proper support for picoprocesses.
- eightysixfour 7y agoThe integration is very impressive, latest builds even have access to the WSL2 file system from Windows. Starting up VS Code on a machine with WSL2 immediately gives you the option to use it as the VS Code environment, it is pretty great.
- kyriakos 7y agoIntegration is even tighter now its not just a VM like many commented here.
- vbezhenar 7y agoCan you write a single feature that's available in WSL 2 but not in VirtualBox?
- kyriakos 7y ago- seamless file system integration - network (you can use 127.0.0.1 to access services in WSL2 or Windows) i.e. it runs on the same home IP.
- eightysixfour 7y agoI don't use virtualbox, so I'm guessing at some features: * The Linux filesystem shows up in Windows as a disk even when the underlying VM is not booted, you can see an example here: https://redmondmag.com/articles/2020/04/08/~/media/ECG/redmondmag/Images/2020/04/0408red_Subsystem_b.ashx https://redmondmag.com/articles/2020/04/08/~/media/ECG/redmo... * And for me the nice one is the integration with VS Code, I just select which distro I want to work in and VS Code will start it (if it isn't running), connect to it as a remote dev environment, and be able to control it as if the VM were within VS Code. It can be done manually with VirtualBox, but VirtualBox gives me no advantages in return. * The networking implementation makes both 127.0.0.1 which is occasionally useful for me.
- garethrowlands 7y agoStarts in one second.
- vbezhenar 7y agoThat's not a feature. And in practice it's not even relevant, because you can start your VM at Windows startup and use Putty to ssh into booted system which takes a fraction of second. Also slim CentOS image boots, well, not in one second, but something like 5 seconds. Fast enough IMO.
- cgb223 7y ago> Presumably, this also means you have to have Hyper-V enabled, crippling all other VM software How does hyper-V cripple other VM software? I just had to enable it to use a prebuilt VM I need, now I’m a little worried
- mehrdadn 7y agoLast time I checked (months ago) VirtualBox just couldn't run under Hyper-V. If you Google around you'll see lots of threads, e.g. https://superuser.com/q/1208850 https://superuser.com/q/1208850 Apparently they claim that as of February 19, 2020, they've "Restored the ability to run VMs through Hyper-V, at the expense of performance". https://www.virtualbox.org/wiki/Changelog-6.1 https://www.virtualbox.org/wiki/Changelog-6.1
- lukevp 7y agoI’m using hyper-v and virtualbox together, seems to be fine performance-wise. Only reason we’re using vbox is that we already have vagrant scripts set up for it and hyper-v didn’t seem to work as well as a target for vagrant.
- deleted 7y ago[deleted]
- Dylan16807 7y agoRestored? That's a weird line. I don't think it ever lost it since the feature was added in 6.0 (released December 18 2018), it was just annoying to activate.
- mehrdadn 7y agoI couldn't get it work, so it was broken as I saw it... not sure who could actually get it to work then.
- Dylan16807 7y agoYou had to manually set "VBoxInternal/NEM/UseRing0Runloop" to 0. The default settings were broken, but the actual functionality was fine. Though I remember it working at some point before that, too...
- lmz 7y agoStop blaming Hyper-V for "crippling other VM software". You ever tried to run VBox and KVM together? It's a limitation of the processor's virtualization extension.
- inyorgroove 7y agoProblem is once Hyper-V is installed and enabled, no other VM can even be started regardless of no Hyper-V VMs actually running. This limitation does not exist on linux afaik. I have run libvirt based VMs and VirtualBox VMs at the same time on linux just fine in the past.
- lukevp 7y agoThat’s not what’s happening. Hyper-v is a type-1 hypervisor. When it’s running, even your Windows instance is running within hyper-v. Windows 10 has the hypervisor platform that lets other vm developers hook into the hyper-v host architecture, that’s how you can get android emulators and virtualbox running under hyper-v. It all works fine but is a little unintuitive to set up.
- HelloNurse 7y agoIf both VirtualBox and VMware give up on Hyper-V coexistence, it must be a bit worse than "unintuitive".
- garethrowlands 7y agoThey haven't given up.
- SXX 7y agoMost likely you just wasn't using VirtualBox own virtualization since it's cant work alongside with KVM. Current version of virtualbox just use KVM just like libvirt.
- IntelMiner 7y agoThat's false The above commenter linked to a far more thorough explanation https://superuser.com/questions/1208850/why-cant-virtualbox-or-vmware-run-with-hyper-v-enabled-on-windows-10 https://superuser.com/questions/1208850/why-cant-virtualbox-...
- jimmcslim 7y ago> Presumably, this also means you have to have Hyper-V enabled, crippling all other VM software. This is being addressed, as discussed by commenter below [1] and at [2]. [1] https://news.ycombinator.com/item?id=22874047 https://news.ycombinator.com/item?id=22874047 [2] https://blogs.vmware.com/workstation/2020/01/vmware-workstation-tech-preview-20h1.html https://blogs.vmware.com/workstation/2020/01/vmware-workstat...
- jchw 7y agoGreat to hear. I suppose this means I should consider keeping my Workstation license up to date...
- hamandcheese 7y agoBoring tech is good tech :)
- quotemstr 7y ago"Boring tech is good tech" is what stagnant companies say to distract people from how they're not innovating.
- pjmlp 7y agoCompanies that stay in the game actually.
- RMPR 7y agoBoring tech is good tech, choose boring tech :) https://news.ycombinator.com/item?id=20323246 https://news.ycombinator.com/item?id=20323246
- mehrdadn 7y agoThe things I liked the most about WSL were the ability to share the same file system (and RAM, etc.) and not have to care about partitioning any resources. And to search the Linux files on the Windows side and even modify them with tools that can handle them (yes, I know what I'm doing). Now all of that goes out the window(s)... so I'm pretty unenthusiastic about WSL2. And the 9P server has been next to useless for me on WSL1. It's so darn slow for a local filesystem, it's almost like accessing files over SMB.
- kyriakos 7y agoYou still don't need to manage all those things. Wsl2 does it all automatically as far as I ve seen from the current version I tried
- mehrdadn 7y agoIt needs a VHD, which requires setting aside a partition of your disk, meaning you can't dynamically share space with your Windows files. That's a huge downside for me. (By "partition" here I'm just referring to the English sense, not the MBR/GPT per se.) You also can't nor search/modify your Linux files directly from Windows like I mentioned. The 9P server with WSL1 has been so slow as to be unusable for some directories when I try to use it. Does it feel native SSD-speed on WSL2? As for RAM, does it really share RAM with Windows? That's great news if it does, but I don't think I've seen any VMs do this, though I've never tried it with Hyper-V... if it does, I'm guessing that's what lets it use memory ballooning?
- eropple 7y agoIt's a resizable VHD that handles its business in the background, so I don't understand the complaint. And you can access your Linux files in Windows just fine when using WSL2. Just go to `\\wsl$`. WSL2 is the first thing to legit make me reconsider my daily-driver Fedora setup in...well, since I started using it in ~2016. I just do not think about it, it's great.
- 7y ago
- Ericson2314 7y agoPart of my clings to hope that this is strictly because rewriting all those gazillion syscalls was a PITA, and they will eventually convert on something in between WSL1 and WSL2 where the Linux "front end" is used with NT, like the opposite of a rump kernel.
- riskyfive 7y agoI really hope apple implements something similar, would much prefer to have a well integrated linux vm than the not-quite-linux of macos
- pram 7y agoDocker is on macOS using the native hypervisor framework, what would be the point?
- fnord77 7y agoand it has some serious file system performance issues that make docker for mac a non-starter for some projects: https://github.com/docker/for-mac/issues/77 https://github.com/docker/for-mac/issues/77 https://docs.docker.com/docker-for-mac/osxfs/#performance-issues-solutions-and-roadmap https://docs.docker.com/docker-for-mac/osxfs/#performance-is...
- 0xDEADBEF 7y agoI've used docker-sync to get around these performance issues.
- jchw 7y agoThis is an interesting take considering Linux is Unix-like and macOS is technically a BSD derivative. I don’t think macOS will ever have a Linux syscall translation layer/subsystem (WSL1) nor a lightweight VM with special integration (WSL2) but you can do sort of similar things in third party software, I think. Docker for Mac is using the native VM framework and includes a filesystem integration called osxfs, but despite mentioning the source code in documentation it does not appear to be open source at this time?
- rvz 7y agoExactly. It really doesn't need a syscall translation layer anyway given its Unix + BSD and POSIX foundations. Although this open-source project [0] does exist for macOS but it looks like its inactive. [0] https://github.com/linux-noah/noah https://github.com/linux-noah/noah
- ahupp 7y agoI switched to WSL2 a month ago and it's been great. With WSL1 I'd regularly run into subtle compatibility problems but haven't seen anything like that with 2. Despite a handful of annoyances, the Win10+WSL2+Visual Studio Code Dev environment has been a lot more pleasant than OSX.
- gdulli 7y agoThat's good to hear. I use VirtualBox to develop on a real Linux VM from Windows and if this lets me get rid of an Oracle product, I'm happy.
- nilkn 7y agoI never thought I’d say it but because of this exact setup with VS Code I’ve actually stopped using my MBP at home in favor of my desktop, which was really only built with gaming in mind. I’ve now gotten used to having all the extra computing power at hand and would struggle to go back to a laptop as my primary development machine.
- richjdsmith 7y agoI'm in the same boat. I'm looking at selling my Mac and just getting an iPad to replace it - running Windows 10 + WSL + VSCode on my desktop pc is more pleasant for me to code at home with than my macbook.
- lostmsu 7y agoBut why could not you do the same before? Even before WSL there was MSYS, which IMO is great, unless you need to compile a C program, that directly uses Linux headers.
- nilkn 7y agoIt’s possible I could have and I just wasn’t sufficiently in the know about which tools to use. I hadn’t used MSYS. I’ve taken my current workflow so far as to even use nix as my primary package manager. Would this have been easily possible before? I ask in earnest. My setup right now is such that even mildly arcane things like that just seem to work for the most part.
- sk5t 7y agoIs there a shell+terminal+font combo that folks really like for WSL? I've tried the new terminal beta with zsh and--for reasons I can't quite articulate right now--it feels "off" and I invariably proceed to boot up virtualbox for my debian, i3, kitty, fira code setup to get work done. Maybe it's the break in filesystems and $HOME? Edit: learning that WSL2 does away with the syscall-translating tech and mandates Hyper-V, the question of whether to look into this further becomes thornier!
- smnrchrds 7y agoI use Cmdr (with solarized theme and Consolas font) with Zsh and Oh My Zsh (with agnoster theme), but it is really a matter of taste.
- GordonS 7y agoAnother happy cmder and Consolas user here! Never used Zsh tho - what benefits does it have?
- smnrchrds 7y agoFor one thing, with Oh My Zsh, you can use nice themes like this: https://github.com/agnoster/agnoster-zsh-theme https://github.com/agnoster/agnoster-zsh-theme Zsh have a long list of nice features that Bash lacks. Two of my favourites: 1. Imagine you are in a directory with file1.ext and file2.ext. You type f[TAB], it autocompletes it to file. So far, Bash and Zsh are the same. If you continue pressing [TAB], bash prints a list of files so you can complete typing the name yourself. Zsh starts cycling through filenames. 2. In Zsh, you can type for example /u/lo/b[TAB] and it automatically expands the path to /usr/local/bin. If multiple paths match the original expression, it shows a list and pressing tab cycles through the options. Zsh is quite feature-rich, and for the most part a drop-in replacement for Bash. See this slide deck for more Zsh awesomeness: https://www.slideshare.net/jaguardesignstudio/why-zsh-is-cooler-than-your-shell-16194692 https://www.slideshare.net/jaguardesignstudio/why-zsh-is-coo...
- nyanpasu64 7y ago
- rvz 7y agoThis is great news. Looks like I neither need a separate Linux VM or dual booting Ubuntu desktop install anymore for testing my software given it will also run on WSL2 on general availability. Another clever move from Microsoft and the Windows Teams.
- molticrystal 7y agoVMWare [0] will also support the Hypervisor Platform Api [1] allowing it to run besides WSL2 which uses Hyper-V. VirtualBox is still struggling and runs slow if at all with WSL2 and Hyper-V [2] This of course has implications on how you setup Docker on a Windows machine, each way having pros and cons. [0] https://blogs.vmware.com/workstation/2020/01/vmware-workstation-tech-preview-20h1.html https://blogs.vmware.com/workstation/2020/01/vmware-workstat... [1] https://docs.microsoft.com/en-us/virtualization/api/hypervisor-platform/hypervisor-platform https://docs.microsoft.com/en-us/virtualization/api/hypervis... [2] https://forums.virtualbox.org/viewtopic.php?p=473538 https://forums.virtualbox.org/viewtopic.php?p=473538
- hu3 7y agoThanks. This information is important to me. I abbandoned WSL2 because it couldn't work along VMWare but the tide seems to have changed.
- TheRealPomax 7y agoEver since Docker became a popular tech, VMware has had little choice: I need docker for my job, so I can't use VMware. That doesn't get them the dollars they want.
- ElCapitanMarkla 7y agoI’ve been in the opposite boat for a while. I need virtual box so can’t use docker on windows but it seems that has changed since February so will give that a try
- souprock 7y agoThis is a worrisome development. We seem to be heading toward a future where hypervisor drivers can only be provided by Microsoft, and you're out of luck if they don't do the job. Hypervisors that need more capability are going to have to do some crazy stuff to stay compatible. One option is to save and restore the whole hypervisor state whenever it runs. Another option is to be some sort of boot loader, seizing the hypervisor capability before Windows can get to it. That'll be some tough code to debug.
- derekp7 7y agoQuestion -- from what I understand, WSL2 is closer to Linux running in a VM, whereas WSL1 was like a Windows kernel level version of Cygwin. Is that mostly correct? Regarding that, remember a number of years ago, prior to VMs there was a patch set for the Linux kernel porting it to user space -- so you could run Linux as a user process, which ended up functioning similar to running it in a VM. Would WSL2 be closer to this model, or is it really running Linux under a stripped down Hyper V?
- minxomat 7y agoWSL 1 was closer to flinux than cygwin.
- derekp7 7y agoAh, I completely forgot about flinux. Seems there were a lot of neat innovations back in the earlier days, including a couple of single system images (SSI) implementations (the opposite of VMs, making a network of hosts look like a single multiple processor system).
- freeone3000 7y agoLiterally running Linux under regular hyper-v, with some clever FS tricks.
- veesahni 7y agoCorrect. WSL1 ran ELF binaries on Windows (as crazy as it sounds). WSL2 is basically linux in a VM + OS provided helper services on both sides.
- yjftsjthsd-h 7y ago> Question -- from what I understand, WSL2 is closer to Linux running in a VM, whereas WSL1 was like a Windows kernel level version of Cygwin. Is that mostly correct? Yes, that's essentially correct. You could also think of it as WINE in reverse; one big difference from cygwin is that it runs unmodified binaries rather than needing to recompile. > prior to VMs there was a patch set for the Linux kernel porting it to user space -- so you could run Linux as a user process User Mode Linux (UML; https://en.wikipedia.org/wiki/User-mode_Linux https://en.wikipedia.org/wiki/User-mode_Linux), which I think is still a thing, although not super popular. > Would WSL2 be closer to this model, or is it really running Linux under a stripped down Hyper V? Not even stripped down; it's running Hyper V. (This is one of the big problems with WSL2; if you use it, you can't use non-HyperV virtualization.)
- brkattk 7y agoWhile this is generally a large improvement, there is still a glaring issue with accessing files between the WSL and Windows https://github.com/microsoft/WSL/issues/4197 https://github.com/microsoft/WSL/issues/4197
- cowmix 7y agoWSL2 with Docker Desktop is amazing. I switched over last week and the performance is amazing. Further, you don't have to reserve CPUs or RAM anymore.
- TaylorAlexander 7y agoI’m holding out for the Linux subsystem for Windows.
- saagarjha 7y agoYou mean Wine?
- m0zg 7y agoThey mean MS replacing the Windows kernel with Linux kernel. Which doesn't sound as crazy as it did just a couple of years ago. Just put all the Windows crap in a VM, similar to WSL2.
- FpUser 7y ago"Just put all the Windows crap in a VM" - if Windows such a crap why even mention it? Just put Linux on your PC and be happy.
- saagarjha 7y agoThere's a lot of Windows-only software out there that will exist regardless of how you feel about it.
- TaylorAlexander 7y agoThis was the tongue in cheek implication of my comment. I’m a Linux user. But yeah Wine actually already does what I want. :)
- pjmlp 7y agoStill waiting for the Linux desktop wonders to take over that crap. Apparently Windows XP was going to do that, then it was Vista with its DX 10 drivers, then WinRT, then Win10,.... It takes time to replace the crap apparently.
- CJefferson 7y agoI dont understand how that would provide any benefit. First problem, all those lovely windows drivers for every piece of hardware and laptop ever made would need porting to Linux.
- bayesian_horse 7y agoWe need a Linux subsystem for Windows... Though Wine is quite good.
- pknopf 7y agocmd.exe via wine :)
- rossy 7y agoWhile similar in concept, Wine is better than WSL1 in a lot of ways due to supporting sound, graphics, and GPU acceleration. I've always been suspicious of WSL because it follows a narrative that benefits Microsoft - that Linux is primarily a command-line/server environment, and the graphical and audio applications for Linux are not worthwhile. It doesn't have to be like this. WSL1 was based on an Android environment for Windows Phone called Project Astoria, which did support graphics.
- sullyj3 7y agoThe graphical and audio applications for linux aren't worthwhile, or at least they're not competitive with the top proprietary offerings. It's not really about the theoretical capacity of of linux to support audio and graphics. The low market share of desktop linux makes it not economically worthwhile for top proprietary software companies to port to linux. That's just an unfortunate fact. I don't really want to edit graphics with Gimp when Photoshop exists, and I don't really want to produce music in Ardour when Ableton Live exists. I think the only real way to fix this is to change the economic incentives by increasing desktop Linux market share, which is a long and uphill battle.
- bayesian_horse 7y agoBlender is competitive in the industry and definitely "worthwhile". Not the market-leader, but being used increasingly in professional settings.
- int_19h 7y agoWSL1 can do graphics just fine, if you run the X server in your Windows environment (which is the right way to do this, in any case). There's implementations - forks of Xming, I assume - that are set up to work like that with minimum hassle, e.g. https://x410.dev/ https://x410.dev/
- Karupan 7y agoSo WSL2 is supported on windows 10 Home as well, which is great. Does that mean Home also gets official Hyper V support?
- francislavoie 7y agoI don't see any mention that it'll be on Home, "General Availability" just means that it's no longer part of the insider preview
- Karupan 7y agoAccording to FAQ [1] it will be. [1] https://docs.microsoft.com/en-us/windows/wsl/wsl2-faq#does-wsl-2-use-hyper-v-will-it-be-available-on-windows-10-home https://docs.microsoft.com/en-us/windows/wsl/wsl2-faq#does-w...
- hemanta212 7y agobeen using it in home for months it works well. Regarding hyper-v they are only making necessary component needed for wsl2 available.
- zlynx 6y agoThere are several Windows features that rely on HyperV under the hood. Home supports them. It does not give the user the ability to run their own virtual machines though.
- mosdl 7y agoHow does this work with IDEs like IntelliJ? I believe WSL 1 had issues with having Windows IntelliJ and the source code being in WSL?
- francislavoie 7y agoWorks just fine, but FS is slow-ish. Your paths look like: \\wsl$\Ubuntu-18.04\home\username
- m0zg 7y agoHave they figured out how to pass through the GPU yet? Would be cool to use this for e.g. PyTorch.
- ngcc_hk 7y agoAs they are different there should be option to do both 1 and 2
- nhumrich 7y agoThere is.
- bithavoc 7y agoWhat’s the energy consumption of WSL2, I understand it’s a Virtual Machine now, isn’t that heavier than what WSL1 is?
- pixelbash 7y ago> WSL extension allows for the VS Code UI to run on the Windows side with a VS Code Server running within the WSL VM This was why I have finally switched away from developing on windows, there's something about the VS remote code server setup that will spawn tons of processes and eventually slow WSL to a crawl. Possibly my fault, I haven't gone through all my extensions and settings carefully, but also not an issue when running VS code on unix without the server.
- chx 7y agoI am giving up. WSL1 was a great invention but Microsoft gave up on it, either because of the filesystem performance problems or because of the debuggers. https://github.com/microsoft/WSL/issues/2028 https://github.com/microsoft/WSL/issues/2028 (lldb, rr, delve all affected). This looks like a dreaded case of the first 90% is easy, it's the second 90% that is hard. Imagine implementing a translator for a vast majority of Linux syscalls just to find certain flavors of ptrace are just not doable. I do not have insider knowledge to ascertain this happened but this would be my educated guess. WSL2 is a VM like any other VM with an uncertain promise for better networking experience and even less certain promise for cross OS file performance which is much, much worse than WSL1 which was already abominable. https://github.com/microsoft/WSL/issues/4197#issuecomment-604592340 https://github.com/microsoft/WSL/issues/4197#issuecomment-60... It was a very nice dream, pity it didn't work out. Because I am using an eGPU Windows 10 needs to stay as the primary OS on the laptop. I bought a little fanless machine from Aliexpress (with laptop-like hardware) for <$300 USD it'll be my home Linux server. What can one do? I guess https://www.reddit.com/r/VFIO/comments/am10z3/success_thunderbolt_egpu_passthrough_on_dell_9560/ https://www.reddit.com/r/VFIO/comments/am10z3/success_thunde... could be a solution if I wanted to go back to Linux primary but I really badly don't want to. Constant hardware headaches were par for the course -- I was solely Linux 2004-2017. I don't want to be again. If there would be a cheap remote sysadmin service... but it doesn't exist. QuadraNet will sysop a server for $39 a month, that'd be awesome for a laptop... but I have never seen anyone doing that.
- sdegutis 7y agoI guess it's subjective. I've been using Linux on Windows 10 pretty successfully for a year now to do some things that would otherwise be much more inconvenient.
- juped 7y agoWSL was very cool from a pure tech standpoint, but I've never been clear what the actual use case for it was. WSL2 seems to be more along the lines of coLinux, which I felt the same way about when it was new.
- 7y ago
- rkagerer 7y agoAm I the only one who thinks this was named backwards? Like, it should been: Linux Subsystem for Windows, or maybe Windows' Subsystem for Linux
- aspaceman 7y agoTotally agree. Feels like a “windows has to be first” type of thing.
- simplicio 7y agoThere was a MS employee on twitter the other day (sorry, I forgot who) saying it was because there were legal issues with naming something with a title that has someone else's trademark as the first word.
- mcny 7y agoThat completely makes sense in my mind just because my favorite reddit app is called slide for reddit. I think reddit forced everyone to use x for Reddit in their name as opposed to Reddit X.
- fredzel 7y agoIt was the case with 'reddit is fun' for android, now it's 'rif is fun'
- Talanes 7y agoReddit did exactly that, like five or six years ago. A bunch of apps had to change their names, which is how you end up with apps like "rif is fun for Reddit," where the first part stands for "Reddit is Fun."
- cgravill 7y agoLink here to the comment https://twitter.com/richturn_ms/status/1245481405947076610 https://twitter.com/richturn_ms/status/1245481405947076610
- comity 7y agoDoes anyone know if WSL2 supports utf8 characters in filenames, such as ":" and "<>" etc? WSL had a limitation that it couldn't display such characters when I accessed a Linux parition through Samba. I know there is a Samba workaround for name mangling, but I prefer to access the actual filenames as created by org-mode. Edit: Samba was running in an Alpine VM that mounted a ZFS partition. The network folder was mounted through Windows.
- tuananh 7y agothe performance on /mnt issue is not yet fixed https://github.com/microsoft/WSL/issues/4197 https://github.com/microsoft/WSL/issues/4197
- veesahni 7y agoOn a Win10 host, I want to edit code in sublime and have the runtime environment in linux. I want fast code search and fast build times. I've found no way to accomplish the above. Code in Windows + Windows Sublime means build in WSL will be slow because cross-os i/o Code in Linux + Windows Sublime means code search will be slow because cross-os i/o Code in Linux + Linux Sublime + Winodws Xserver means interface is laggy because, well, Xserver VSCode gets around this by running in a client/server model with client on Windows and Server in Linux... but then I'm stuck with an Electron based editor instead of Sublime.
- _bxg1 7y agoWhat Electron-related problems have you had with VSCode? I've been using it as my primary for a few years now and it's been nothing but stellar. And that integration sounds incredibly cool.
- rozab 7y agoThe electron hate really is getting old. vscode and some other electron apps run far faster than many comparable programs with a more traditional architecture. Yes electron could be considered inelegant, but so can a great many things in computing. If it works, we should use it.
- _bxg1 7y agoYep. If anything, "old-school" Visual Studio is the one that feels bloated by comparison, despite being a native app. Software quality cannot be reduced to the choice of language or framework.
- kitotik 7y agoOut of curiosity, what do most people use this for? (I tried rewording this question a few times to not sound snarky, but failed.)
- kyriakos 7y agoWeb development primarily
- geerlingguy 7y agoOr most open source non-windows software work. So many tools run great (or only run) under Linux, and dev tooling for these projects is also heavily Linux-centric. Often you might be able to get a package working under Windows, but support is thin and it's prone to breakage. Easier to just run it under Linux in a VM, like what WSL2 is doing.
- pjmlp 7y agoWeb development with node and ruby it seems. Java and .NET Web development has been perfectly fine the last decades.
- deleted 7y ago[deleted]
- sz4kerto 7y agoDeveloping relatively large systems with dozens of different, mostly JVM-based services.
- 0x49d1 7y agoBut how the VM implementation is faster then "native" call translations?
- lostmsu 7y agoOriginal announcement: https://devblogs.microsoft.com/commandline/wsl2-will-be-generally-available-in-windows-10-version-2004/ https://devblogs.microsoft.com/commandline/wsl2-will-be-gene...
- jdsully 7y agoI've been running this in the insider branch for the last 3 months and it's been amazing. You can even recompile your own kernel if you want. Your essentially getting the "real thing" with pretty seamless integration to the rest of windows. I'd never want to go back to WSL1.
- MAGZine 7y agoI recently wanted to run some linux apps on windows (simple stuff like ls, ssh-keygen, etc) and found that most instructions were actually pointing me to install a ubuntu VM rather than use the native subsystem stuff touted a couple years ago. I was a little disappointed in this. Running a VM is a lot more hassle than just running the apps natively. Feels like a step backwards than a step forward.
- hexagonsun 7y agohonestly, i use WSL to ssh into servers in a pinch and get things taken care of... my experience actually trying to develop things (python/django/node) has been poor otherwise.
- stinos 7y agoIf it's just ssh, what's the benefit over using it on WSL compared to using the native ssh in Windows?
- cable2600 7y agoI just used VirtualBox by Oracle with Linux Mint. Seems less buggier and I can share files with Dropbox, etc.
- Gimpei 7y agoWould be nice if it had GPU support so I could use it for deep learning prototyping. I might use Windows instead of Ubuntu then. I can't use macos now that they dropped Nvidia.
- DeathArrow 7y agoI did ML stuff under Windows.
- AaronFriel 7y agoIn WSL1, running "wsl git status" on a moderately sized repo on an NTFS (Windows side) drive or SMB file share is nearly instantaneous. In WSL2, running the same command takes over 30 seconds. WSL2 is a massive hit to the seemless experience between the two operating systems with filesystem performance from Linux to Windows files orders of magnitude worse. Yes, unzipping tarballs or manipulating and stat syscalls are cheaper now on the Linux side. The downside performance loss is, however, staggering for the files I had in C:\ Don't even get me started on how long an npm install took. One of the truly wonderous things about WSL1 was the ability to do something like this in a PowerShell window: C:\some-code-dir\> wsl grep -R "something" | Some-PowerShell | ForEach-Item { } Now performance across the OS boundary is so bad, I wouldn't even think of using "wsl grep" in my C drive. Or "wsl npm install" or "wsl npm run test" or any of that. It's very depressing because WSL1 is so, so promising and is so close to feature parity. WSL2 should definitely stick around and has use cases, for Docker it's unparalleled. But for daily driver mixed OS use, WSL2 has made me very unhappy. I think I'll be deconverting my various WSL distributions because the performance hit was too much, it just was absolutely unbearable to even run simple commands in my Windows side.
- michaelgrafl 7y agoDeactivating Windows Defender for the subsystem‘s storage folder helps somewhat, but I agree that the situation makes the WSL close to broken for many potential users.
- veesahni 7y agoI believe WSL2 was designed to keep your files inside on ext4 instead of outside on NTFS.
- Dylan16807 7y agoYes, but it sure would be nice to get native speeds on both.
- veesahni 7y agoThere in lies the challenge that they have to deal with. WSL1 was not great in local or cross-os i/o. WSL2 is at least great in local i/o.
- yuz 7y agoBack to Cygwin?
- executesorder66 7y agoI always laugh when I think about this. Microsoft's tools are so bad that they had to ship an entire other OS in their own OS just so that programmers can be productive.
- deleted 7y ago[deleted]
- chmln 7y agoIn genuine amazement at a lot of the comments here - why not just dual boot Linux instead of using it in a VM? Productivity on a Linux machine can be so far ahead of Windows, especially if you've got a terminal-based workflow an maybe a tiling WM
- sullyj3 7y agoBecause I don't want to have to reboot every time I want to do something else with my computer.
- nindalf 7y agoI've been using WSL for the last year. No complaints at all so far. I don't want to dual boot because of the hassle of restarting my computer every time I want to do something different - like switching between a video game (say Age of Empires) and development. I don't want the hassle or overhead of dealing with a VM, allocating resources permanently to that whether it needs it or not. This way, it feels like I'm on Linux the whole time with a Windows themed desktop, great support for games and no hardware issues. This isn't about ideological purity for me. If everything works, I'm happy.
- LeonM 7y agoMy workflow is mostly terminal based, and I used to use tiling WMs, yet I am now back to Windows + WSL. Why? Because GPU driver compatibility is still so bad on Linux that I can't get any of the popular distros to work properly on my setup (laptop with hybrid Intel/nVidia GPU setup, thunderbolt dock, external display with different scaling than laptop display). And yes, if I spend a weekend fiddling with Nouveau drivers I might get it to run somewhat decently, but really I don't want to spend that time on my work setup. Window + WSL works out of the box, so I'll use that.
- chmln 7y agoSounds fair, I didn't mean to come off snarky or anything. I've got Nvidia too and Nouveau works only well enough to download the proprietary drivers
- 7y ago
- DeathArrow 7y agoGreat! Now I can run Tux Racer on Windows properly!
- bad_user 7y agoI have a MacBook Pro that I wanted to turn into a Windows laptop. Unfortunately if you install Windows from scratch, without going through Bootcamp to install it side by side with MacOS, Hyper-V support is disabled. This means that I cannot use WSL2. Or Windows, since without a working Linux environment it's useless to me and I don't want to invest in WSL v1. Might as well go for Ubuntu 20.04.
- smitty1e 7y agoWindows seems to be gradually trending toward an OSX-style desktop experience riding on top of a Linux kernel.
- pjmlp 7y agoExcept it isn't, that Linux kernel runs on top of a Hyper-V instance, alongside the NT kernel which is managing the whole show. More z/OS and less UNIX.
- smitty1e 7y agoFor now.
- pjmlp 7y agoEven if Microsoft was willing to throw away what makes Windows have the desktop market that Linux will never have, and go back to its Xenix roots, Linux would probably get as much back as it has been getting from all those Android OEM contributions. So not really a reason to cheer what would be yet another pyrrhic victory in the desktop/mobile space.
- smitty1e 7y ago> Microsoft was willing to throw away what makes Windows have the desktop market I certainly neither said, implied, or agreed with that concept, no.
- oxalorg 7y agoI've been a happy user of WSL2 since 2 months, and I absolutely love it. After switching to it, I completely stopped using Mac Mini and Linux. It has made my life so easier. All the Linux stuff + development work gets done inside Windows Terminal + WSL2 + NeoVim, and I still get to keep Windows for Gaming, Designing, Office work, other random programs etc.
- rfoo 7y agoI've been a happy user of running a Linux VM (without X) besides Windows since 6 years ago (first VirtualBox, then Hyper-V after switching to Win10) :p Congrats to WSL2 team, they introduced this pattern to a much wider audience.
- evertheylen 7y agoI would really, really love to go back to using Linux natively but sadly the hardware on this laptop is not supported well enough. So I eventually gave up and installed Windows while using WSL2 extensively. Performance is on par with running Linux natively. I compiled my own kernel with ext4 encryption support, and it works quite well. I use it for 90% of my files. Combined with the new Windows Terminal and VSCode support for WSL, there is little friction left. (Also, to address some comments, you can view Windows files from Linux and Linux files from Windows, with some reduced performance.)
- tasubotadas 7y agoI am super excited about this. WSL1 is great. WSL2 will allow me to run docker images without struggling with vagrantfiles so that's awesome.
- miloshadzic 7y agoI seem to perhaps be in the minority here, but I got onto the slow ring just for WSL2 and it has been excellent so far. I am primarily a Ruby developer and things just work.
- kesor 7y agoFor those of you who will be running Docker Desktop on WSL2 - which allows to "transparently" use the "docker" command on your other Linux that runs in WSL2. And allows to use your WSL2 "other Linux" filesystem to share volumes with Docker containers! .. Anyway, you need to know that when this stupid Docker and/or WSL2 VM is taking up all your Windows 10 memory - not all is lost. Using these two commands, you can force WSL2 to give back the memory it is holding prisoner! echo 1 | sudo tee /proc/sys/vm/drop_caches echo 1 | sudo tee /proc/sys/vm/compact_memory Especially if the one doing the mess is the "VM" of Docker. Now that Docker Desktop is using WSL2 instead of its own VM, you can't see the bastard in Hyper-V console at all... apparently the whole WSL2 VM is not seen in Hyper-V console, even though it IS a damn VM. But it does appear in Task Manager as "Vmmem" and taking up gigabytes of your memory.
- _ph_ 7y agoA great step. but I feel I have to repeat my "ceterum censeo" of saying that wsl would really benefit, if Microsoft would add a native Wayland support so that the Windows Deskop would appear as a Wayland server for the Linux VM. This would allow any Wayland-compatible Linux application to run seamlessly on the Windows desktop and fully utilizing the native graphics drivers.
- sandGorgon 7y agoWSL2 is a fantastic product. The ability to debug python code on ubuntu and alt-tab to Steam is unparalleled. However there is a fundamental issue - Microsoft is treating this as a toy project. The number 1 problem is that the file system inside an Ubuntu shell/wsl2-container is sitting inside a hidden file system. It is is not exposed to the rest of windows and neither to backup tools like Dropbox, etc. So you have a huge chance of losing important documents inside a WSL2 container. Now, you can "Cd /c/Documents" and do your work - but this filesystem is unimaginably slow. Not sure if it is because of file mounts, etc. The performance is incredibly bad. If there are WSL2 devs here - please make the working container filesystem as a first class directory inside the rest of windows. I'll live with performance issues for a while...but this is a blocker.
- ccmcarey 7y agoI think this is not correct. You can go to \\wsl$\ and it shows each wsl install as a network drive.
- sandGorgon 7y agoyes - however those paths are not available to any backup system. if you want to switch from ubuntu to fedora, there is no easy way to do it. If you accidentally uninstall ubuntu, you will lose that partition (and all your work). this has happened to me once already. In linux, you just have a separate /home partition . You can have a dozen operating systems, merrily using the same home partition. you can trash your OS, but your home directory doesnt get trashed. i have a pending request to offer the concept of a "home directory". the filesystem on which i work inside wsl2 should not be opaque to the rest of the operating system.
- pojntfx 7y agoY.
- mikkelam 7y agoSlightly off topic but, I've been a mac user for some 6 years now and was recently forced to switch to either linux or windows for a deep learning desktop experience. I'm wondering how complete the windows experience will feel as a long-time unix user? Windows seems to have everything these days with WSL, great programming, gaming, media/rendering environments as well as super stable. What's bad?
- RMPR 7y agoWSL1 has some unimplemented features, but overall it's not a bad experience.
- abol3z 7y agoI've been using WSL1 for a long time now and I am very happy with it. The way I use it is to have all my files and project on windows FS and I code using windows software (VSCode, Eclipse) but when I build and test, I use WSL1, and I didn't feel that the performance was that bad since I have an SSD and I don't mind waiting for few more minutes to rebuild a project. But the most important thing for me was that I didn't care about managing another file system. All my files are still on windows where I used to keep them, file sync and backups are working as expected, and I easily browse and edit these files on the Windows side. For docker, I installed docker on Windows and hooked Docker CLI on WSL1 to it using some configurations. and I was happy with it. The question is, for the way I use WSL1, will WSL2 be an improvement or a drawback for me? and should someone like me switch to WSL2?
- tyingq 7y ago"unzipping tarbars could see a 20 times performance increase" Took me several reads to figure out that "tarbars" was a typo for "tarballs". Thought I'd missed some new archive format.
- criddell 7y agoBack in the 80's wasn't there some issue with Microsoft having to pay AT&T royalties for Xenix and in order to get out of that agreement, they had to agree to stop doing anything related to Unix?
- AltruisticGapHN 7y agoI would love to use Windows WSL full time, along with docker containers, for general web development. There is one thing though that no one talks about.. the fonts!!! The font smoothing is awful on Windows... will this ever change? The new terminal looks alright, the default font is nice; but most other programs I like look awful in Windows: Sublime Text, VSCode, gVIM, ... I just can't find a monospace font that looks "thick" enough for readability and have smooth edges -- especially with dark text on light background.