Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What do you propose if you want to use a windows program to edit those files?

For example I use intellij on Windows but want to compile and test on the Linux machine. If it takes 30 seconds longer than wsl 1, why would I bother changing?

What is the actual point of wsl if not for the cross compatible filesystems



WSL never really got the cross compatible filesystems working though: I eventually found myself giving up on it and just using cygwin. I honestly don't understand why WSL gets so much attention when cygwin is just so much more compatible with everything and includes essentially every package I have ever wanted?


I've wondered the same. A lot of it is PR from Microsoft, including this post here probably.

There is a Reddit sub for WSL (/r/bashonubuntuonwindows) and it's apparent that MS has PR people on it pimping each new release. Reminding these mostly new developers that Cygwin has been around (with all its problems) for years, brings on a flood of downvotes.

And now it's exactly the same with WSL2; when someone has an issue with some esoteric networking feature that is still not supported on WSL2 beta versions, I'll often remind them that VMWare Player and VirtualBox have been around for a decade and will solve their problem, while also including all sorts of nice features like shared folders, drag & drop, copy and paste integration, etc. But they don't want to hear it. They've been fed so much marketing that WSL and WSL2 are really something incredible...


Cygwin isn’t backed by Microsoft.


That's not my experience with VS Code on WSL 2. I have been using it for months using the remote extension, hosting my git repos in the Ubuntu subsystem, it works like a charm and feels very responsive.

Maybe wait for an IDE update that handles properly WSL 2?


> using the remote extension

Then there is no WSL 2 handling in your editor. VSCode remote extension works in the same way for either WSL 2, or a full-fledged Linux VM, or even a remote Linux server.

As someone who run a Linux VM side by side all times, I really don't get WSL 2.


You're just playing with the words here...

It's the same as saying: " As a person who runs containers all the time, I really don't get Docker".

The point is VS Code handles my code hosted in WSL 2 out of the box. I don't care that I could use a VM or a remote server instead.

I just suggested that the parent commenter waits for is IDE to implement a similar integration...


Sorry, should have made my point more clear.

VSCode made some unique design choices which enable them to support connecting to any Linux server, VM or not. In contrast, these design choices may not be possible for other IDEs. So, because WSL 2 is, effectively, a Linux VM, supporting it in editor is harder than supporting WSL 1.

As for "I really don't get" part, I wanted to say that WSL 2 sounds like a regression to me, WSL 1 makes it possible to achieve something (namely, local-ish cross-"os" net/process/file-system integration) that is entirely impossible otherwise, while WSL 2 is a nice packaged-up solution but functionally does not do more than people already get (Hyper-V).


No worries, thanks for taking the time to explain.

The software engineer in me agrees with you, WSL 1 was architecturally more ambitious than version 2.

As a user, I couldn't care less. I just hope Microsoft manages to create a good ecosystem around WSL.


Nit: WSL2 is available on Windows Home, while Hyper-V is reserved for Pro and up.


Solution: Any other virtualization platform.


One thing that's very valuable to me in WSL (both 1 and 2) is the automagic network settings that make ports available between systems - so if I start listening on 127.0.0.1:1234 in Linux, I can connect to that on Windows and vice versa.


> the remote extension

Then you could as well run your stuff in a regular docker container, WSL becomes redundant.


It seems WSL1 isn't going away for now, so you can keep using that. WSL1 and 2 can be run side-by-side, isn't that pretty good?

https://docs.microsoft.com/en-us/windows/wsl/wsl2-faq#what-w...

Also, it seems the Intellij team is working on supporting WSL2 in some ways. Check their issue tracker.

Ex: https://youtrack.jetbrains.com/issue/IDEA-197573


For wsl2, Vscode has integrations that let you do exactly that. I use python primarily and it lets you use the python interpreter installed on wsl. I assume other IDEs would have something similar or at least let you develop using a remote machine, but in this case you would configure it to point at your VM instead.

As long as your processes and files are from the wsl vm, it is extremely fast. I rather use the wsl shell, so all of my files are in the vm.


IntelliJ IDEA 2020.1 now supports wsl$ paths[1]. You can vote on supporting other features here[2].

[1] https://youtrack.jetbrains.com/issue/IDEA-197573?p=IDEABKL-7...

[2] https://youtrack.jetbrains.com/issue/IDEA-171510


The problem is that special integration is required.

Personally I don't like VS Code, I too use IntelliJ IDEA, which will probably end up having support, but it didn't last time I tried.

On my Macbook I also use Emacs and GUI versus terminal shouldn't be an issue. I'd want Emacs from inside a WSL bash, I'd want it from the Windows GUI too. So that's going to be a headache.


You can access files on the Linux file system from Windows.


Has that changed from wsl 1? I've seen bad things about directly trying to modify the files within wsl.

It's not the appdata folder right?


Since version 1903, the proper way to access Linux files for writing is to invoke explorer.exe from within WSL. A transparent 9P mount is created for the working directory and files are made accessible through a regular Explorer window.

https://devblogs.microsoft.com/commandline/whats-new-for-wsl...


Microsoft is even integrating seamless access shortcuts to the WSL filesystems as top level citizens within File Explorer[1].

https://www.theverge.com/2020/4/8/21213783/microsoft-windows...


This has been changed. WSL 2 VM now runs a 9p file server, and on the Windows side it mounts to \\wsl$. Of course, the performance are degraded. It would certainly take longer for Intellij to index your project.


WSL 1 also supports the 9p file server and \\wsl$, you just have to upgrade to at least Windows 10 1903.

(Also, hints are that Microsoft is exploring adding shortcuts to \\wsl$ directly to the File Explorer left hand tree.)


Samba mount your wsl2 (hyper-v) in Windows. Simple.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: