Hacker News new | past | comments | ask | show | jobs | submit login

Linux accessing Windows is indeed way slower under WSL 2, and I get the impression from what I’ve heard that this is unlikely to ever be improved much. But working the other way round is a bit faster than it used to be, if I recall correctly, and working purely within ext4 is enormously faster than under WSL 1.

Combined with the steady improvements to being able to access the Linux side from Windows (under \\wsl$\machine-name), and being able to mount that to a drive letter (I have my ~/.zprofile run `/mnt/c/WINDOWS/system32/subst.exe A: '\\wsl$\arch' > /dev/null`, which delays subsequent login shell startups by 30–40ms, but that’s not too bad), shifting all your relevant stuff onto the Linux side and still working with Windows tools where desirable is quite feasible.

I moved all my files (including a >700MB Git repository) from C: to A: after upgrading to WSL 2. Well worth it. I do most of my work in a terminal (the Linux side) or in gVim (the Windows side).




+1

I also tried WSL 1 with Ubuntu and was hugely disappointed by the speed. Even a simle agt-get install would take forever.

WSL 2 improved the Linux filesystem speed A LOT. I think it's a sane approach:

* keep all your dev stuff in WSL (The Visual Studio Code "Remote - WSL" plugin is amazing!)

* use Windows for GUI tools only


Interesting. Is it possible to use something like Visual Studio Code (my main editor due to a lot of TypeScript focused work) with the Linux filesystem? I think I tried this and couldn't get it to work but I can't remember and maybe I did it wrong and am just incompetent.


The "Remote - WSL" extension allows you to open a folder inside WSL but keep writing code inside VS Code running as a Windows process. It's available at https://github.com/Microsoft/vscode-remote-release.git


> shifting all your relevant stuff onto the Linux side and still working with Windows tools where desirable is quite feasible.

Is IntelliJ IDEA able to detect file changes like this? Maybe share from Linux via CIFS?


The WSL filesystem is already exposed at \\wsl$\distro-name (that landed in the Windows build from 6 or 12 months ago, so you can try it now on a release channel WSL 1 distro). I doubt that’s enough for file watching (certainly things like file locking aren’t supported), and I don’t believe CIFS would allow that either.

For watching file changes specifically, I imagine that you’d need a helper that could run on the Linux side and do any inotify or similar stuff there. I have no idea what IntelliJ might or might not support along these lines. I get the impression that VS Code is generally the tool with the best support, though again I have no concrete knowledge about file watching in particular.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: