Hacker News new | past | comments | ask | show | jobs | submit login
Getting Crazy with Windows Subsystem for Linux (brianketelsen.com)
60 points by bketelsen on Dec 13, 2017 | hide | past | favorite | 17 comments



Going down a different containerized route, if you use Docker for this you won't even need a separate WSL installation for each project but you'll still get your own container based isolation with an "open terminal and start coding!" work flow.

WSL plays nicely with Docker for Windows[0].

At this point Windows running Docker connected through WSL offers me a more productive Linux development environment than running Linux natively (mainly because certain apps I depend on don't run on Linux).

I've been running this set up for months and it's super solid.

[0]: https://nickjanetakis.com/blog/setting-up-docker-for-windows...


I really like your blog layout/theme. Clean and readable. Have you tried mounting code from WSL into a docker container and using vim/emacs in a shell in docker?


Thanks for the kind words about the blog layout.

I keep my source code outside of WSL's file system because I don't trust it yet.

It's then mounted into WSL and Docker for Windows. Docker volume mounts work fine with that set up.

I don't use vim/emacs but running them straight in WSL should be fine. I wouldn't think to run vim/emacs directly inside of the container (because I try to adhere to the "1 container, 1 process" best practice) but in theory it would work no problem.

In this WSL set up article[0] I go over installing Sublime Text within WSL and using MobaXterm as an X server. It runs lightning fast.

[0]: https://nickjanetakis.com/blog/using-wsl-and-mobaxterm-to-cr...


I've done exactly that. However it only recently worked flawlessly due to a bug in Powershell and how Hyper-V interact. Here's a sample setup.

https://gist.github.com/jamesleonis/277901b79f5bae4b0487daf4...


Is it just me or should it have been named the other way around? This is a Linux Subsystem for Windows (just like there is/was a POSIX subsystem for Windows).

I thought this was an official WINE-like layer for Linux.


I see what you mean and understand the confusion. Though I think it is called what it is because it is a distinct Windows subsystem, with various kernel drivers and modules, that are for Linux processes. The substytem is still Windows (using Pico providers and processes), and so it is therefore not a “Linux Subsystem”.



You are correct, but since backwards-compatibility matters more in the Windows world than correct, it will likely never be changed.


Has WSL gotten more stable? I found it unusable when it first came out.


OP here (disclaimer, I work for Microsoft, but I'm a Linux and Mac guy on the Azure team). Yes, it really has. Originally many things didn't work, node, redis, others wouldn't even run. Now I can't find anything that won't run at all and my only complaint overall is that disk IO is a little slower than on the Windows side of things. Overall it's really nice. Zero changes to my Ubuntu dotfiles.


Look at the cousin post to yours in this thread. As is often the case, the use-cases of the programmers are quite different from the use cases of many other users, but the system is optimized only for the programmer's use cases.


My machine only crashes maybe once every other week now. Mostly when I'm copying files in/out of the WSL filesystem, or doing any disk intensive tasks, such as npm install.

I do all my work in vim/tmux, and I run that inside of XFCE terminal running in WSL, connected to Xming. So all and all, it's better than Cygwin but I'd much rather use a Mac or Linux/BSD.


nmap doesn't work, as one example.


It's also quite special as it needs raw socket access (doesn't it work in connect() mode though?), it is on the backlog though as I understand.

Other things that won't work are fuse and VPN's and loading arbitrary kernel drivers (it's surprising how many people don't seem to get that it only implements userland compatibility)


I tried to do some Golang development on Windows using the Buffalo framework[0]. At first, I got started by just using the Windows-compatible Go distribution.

The CLI tool wouldn't install because sqlite was listed as a dependency and it had compilation issues. I spent around an hour trying to look at using cygwin or some other equivalent to get a semi-sane devtool setup before I gave up and turned to WSL.

To my chagrin, WSL now has to be installed through the Windows Store - Linux distributions are downloadable apps. Now, I had a local Windows account so every time I tried to install Ubuntu through the store I got "something happened on our end." I'm a bit slow so it took me a while to realize that I had to sign in with a Microsoft account to use the Windows app store. I had one laying around so I signed in installed Ubuntu.

Filled with hope, I popped into WSL's bash terminal and installed Go, Node, and the Buffalo CLI. However, each invocation of `buffalo dev` took several seconds to run. Like, ten to fifteen seconds. I became overwhelmed with frustration and installed Antergos into a virtual machine and just rolled with that. And everything worked.

I just... I dunno. It's cool that WSL exists but every time I try to use it... meh.

[0]: https://github.com/gobuffalo/buffalo


I love WSL, but really want GPU passthrough support in the future.


The trouble is: it's not a VM, so what you are asking for is not passthrough, but driver support.




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

Search: