Hacker News new | comments | show | ask | jobs | submit login
Ask HN: Is anyone using the Windows 10 Subsytem for Linux?
28 points by rayvy 14 days ago | hide | past | web | favorite | 36 comments
So I recently got a new machine (Windows 10 PC) and I came across this reference[1] for downloading the Windows 10 subsystem for Linux. I downloaded and installed everything fine per the docs, but now my question is:

What are the limitations on this instance of Linux?

Can I use all my machine's resources (RAM, Disk, CPU)? Or are only a certain amount of these resources allocated for the Linux instance? I ask because being able to run Linux on this machine this easily sounds a bit...too good to be true. Any documentation references will be much appreciated.

[1] https://docs.microsoft.com/en-us/windows/wsl/install-win10




It's cool, but it's not what you'd normally understand "Linux" to be. It implements the Linux kernel syscalls, so it supports most of glibc and some of the GNU userland, but misses a lot of the stuff that makes Linux, well, Linux. You can't use iptables. No namespaces AKA containers. When you get to userland, your session is just a bash login shell. There's no DBus, no systemd, no X11, no clipboard. You have to do some fairly ugly hacking to share an ssh-agent between two consoles. And so on and on and on. It's cool for some things, but not good enough for some other things, and I don't see it growing support for those in the future either.


X11 just requires a Windows based X-Server. Then you can use your favourite xterm emulator and worry less about your ssh agent woes.

No Dbus - because no drivers. No systemd - hurrah No proper init system - sucks, but at least you get fstab mounting drives.

I think we'll see a better init mechanism in future, and I hope loadable module support for filesystems / usb devices


(Well that was a really subtle dig at systemd.)

I ended up uninstalling the Linux subsystem (after reading through this thread), and going with a Hyper VM using an Ubuntu image. Enjoying it so far.


I recommend enabling WSL, installing your favorite distro from the Windows store and giving it a try. I think you'll be surprised by what WSL CAN do and the scenarios in which it's more useful than a full VM.

Distros running on WSL also consume FAR fewer resources (esp. memory) compared to full VM's, so runs well alongside all your usual tools.

It doesn't (and wasn't designed to) replace a full Linux instance, but often goes ~80% of the way towards meeting the every-day needs of a lot of developers who just need their code to build and run locally.

YMMV.


I've used it a bit but not seriously/professionally. My biggest issue was that after installing NVM and node, startup of the terminal took literally seconds. It was so bad that I had to move the NVM init lines from bashrc to an alias and I only run it when I know I'm working on node stuff. Not sure if it was just me or everyone else too.

Other gripes include relatively little customization for the terminal window. You can customize colors and fonts. But I don't remember it even supporting tabs.

Also the disk volume of your Linux subsystem is relatively separate from Windows, so if you wanna have an IDE edit code in a folder and run such code in the Linux terminal, you have to cd into some strange volume path to get there. Can work around it by creating a symlink from your home dir.

Ultimately my opinion is if you want Windows/Linux and not buy into the Mac ecosystem, it's better to just dual boot Win/Linux and only boot into Windows if you need to use some software not on Linux.


I am a big fan of WSL. It is fast, and you can run many different Linux distros side-by-side. There were some quirks in the past, but it almost always just works. I see it as a serious alternative to using a Mac or Linux machine.

In all fairness to the points above:

- The Linux shell starts immediately without NVM. As mentioned, this isn't only a Windows issue. (Alternatively, you can only load NVM when needed.)

- The home directory can be permanently changed with just a few Linux commands. (I agree that the default should have been your Windows home directory.)

- Many excellent third-party Windows terminals exist. (Window's default terminal is not user-friendly.)


The NVM init slowness issue isn't specific to WSL - see https://github.com/creationix/nvm/issues/1277. I also had to sandbox the NVM init lines (on macOS) as timing my .bashrc revealed it as the worst offender.

On the topic of speeding up terminal startup, I can recommend https://github.com/benvan/sandboxd for managing various shell initialization scripts to only be run or sourced at the point where they are needed.


Notably, I have NVM setup to auto init on a work MBP and two personal Linux laptops before, on Antergos (Arch) and CentOS (on a very old and slow laptop even), and terminal startup time is still near instant in all cases. Issue was definitely isolated to WSL in my experience.


I use WSL with ConEmu professionally. ConEmu has all the usual terminal bells and whistles.

Overrall it works pretty well, I'm rarely reminded that this isn't Linux or a Mac (as long as I'm just looking at the terminal). I still prefer working on a Mac (pre-crazy-keyboard), but this is a serviceable replacement for working on your standard web frontend stack. Once in a blue moon NPM will produce some esoteric WSL-only error that will take hours to debug, but that's rare.


> Ultimately my opinion is if you want Windows/Linux and not buy into the Mac ecosystem, it's better to just dual boot Win/Linux

This was my first impression, but after seeing this really streamlined option available, I thought I'd give it a go. Haven't tried to go too in-depth as of yet. If this route doesn't prove viable then I'll probably go the dual boot route.


I'm not OP, but thanks for writing this. I just bought my first PC in ages last weekend and was thinking of installing the Linux subsystem. I appreciate your review and the advice at the end.


Also where can I find the dir for this Linux subsystem? (still a Windows noob)


In short ... DON'T!

Assume that your distro's are locked away behind a one-way wall - Linux can see Windows files, but Windows cannot (safely) use Linux files. More details here: https://blogs.msdn.microsoft.com/commandline/2016/11/17/do-n...

And yes, we're working to close this gap in future releases, so stay tuned!


Be careful what you mess with in Windows regarding these folders. The WSL does not react as one might expect to changes made to its files using Windows (ie you can easily screw it up and have to in reinstall if you make changes to important WSL files via Windows).

The folder for WSL Ubuntu is usually here:

C:\Users\<username>\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState

Your root directory should be here:

C:\Users\<username>\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs


I use WSL on a constant basis. I haven't had any problems with it so far. As others have noted, it can take a second or two for the terminal to start up. That's probably my only gripe so far. I usually leave the terminal running for long stretches of time, so that start up time is ultimately meaningless.

That said, I'm not doing anything unusual with it, I haven't installed anything out of the ordinary. As such I can't speak to the depth of compatibility.


I recently switched from Fedora 26 to Windows 10. I've been using WSL for the past 3 days for webdev and so far its been pretty smooth.

Feels pretty similar to doing web with a Macbook Pro. No issues with local servers or anything.

One odd thing is that the Linux home directory is different from your Windows user directory. If you use the terminal from within VSCode this is a none issue since it starts in the project working directory anyway.

Honestly, the thing I miss most from Linux / OS X is the dropdown Quake style terminal. Wish Windows had better terminal emulators.


WSL does very well for me.

Lack of booting services can be irksome, no underlying support for docker, no KVM etc. (Not having to deal with systemd is a bonus IMHO)

However pretty much everything else I've thrown at it works.

Even running X apps (you need a Windows native X server, but that's fine.

You can use up all the disk space, other drives, as much RAM as you need ... It's all available.

The minor annoyance for me is the lack of specific file system support (fuse would do at a pinch) and maybe libusb support too. But those are easily solved with spinning up Linux in your favourite hypervisor.


We hear you re. disk perf, and Linux filesystem access from Windows - we're working on it. Bear with us.

Also, we added a decent amount of libusb support back in Creators Update: https://blogs.msdn.microsoft.com/commandline/2017/05/10/bash...


I'm using it full-time, albeit not for anything esoteric - mostly for zsh & bash, all my commandline stuff, node/npm etc. For these purposes it's pretty much equivalent to doing the same on macOS (though if you're used to Linux, the core utilities will be more familiar on WSL than on the mac). By and large Microsoft have done an impressive job with WSL. Windows vs unix filepaths can be a pest for some things (particularly integrating commandline with GUI apps), but I don't think I've come across anything without a workaround so far.

I wouldn't really call it 'running Linux' - for that you'll need to actually install & run Linux (either on the metal or in a VM). But for many of the purposes for which you might want to run Linux, WSL is more than adequate.


I do use it on a consistent basis, after my MacBook had keyboard issues in May. I forced myself to create an entire web app on it over the course of 1 month to see how it felt.

Surprisingly, it was quite a pleasure to work with. There are certainly small little quirks that takes some getting used to and some keyboard short cuts that aren’t present from my Mac setup. Nonetheless, WSL is good enough that I would happily recommend it to colleagues.


Cygwin works much better for me than WSL - it strikes a perfect balance between being a full-featured UNIX and, at the same time, being part of Windows.


Same here, Although I have yet to see a deliberate comparison between the two.

can't see the point sorry, i would just install linux as the base os and windows as a guest.


You cannot use GPU for computation inside WSL. https://wpdev.uservoice.com/forums/266908-command-prompt-con... It's one of the most requested feature and not having that is a big negative for me. (I've used WSL and then switched to simply having dual boot Windosw+Ubuntu)


- Bash terminal in WSL is very limited in color support, no tabs. use ConEmu or X11 + Terminator - Due to lack of good color support, themes like Airline dont render well - Could never get ssh-agent to work fine, that literally sucks FWIW:

Coming from a Mac, it still did not gave me the UX that I was used. Everything seems to be patched on.

Due to KB issues, at this new job, I bit the bullet and tried to move to Win + WSL. Unfortunately, did not work out for me and I am going back to Mac (new 2018 ones).


Re. Color: Not true - Windows Console supports 16M 25-bit RGB colors since Creators Update (build 1703): https://blogs.msdn.microsoft.com/commandline/2016/09/22/24-b...

That said, yes, the Console cannot currently support font-fallback and thus cannot display glyphs that are not present in your currently selected font. We are, however, working on fixing this in an up-coming OS release.

Bear with us - lots of exciting things afoot with the Windows Console.


Note that it is not an "instance of Linux". Microsoft's nomenclature for these NT subsystems is effectively to name the part that the Windows NT kernel substitutes for. There is no Linux in the Windows Subsystem for Linux.

* https://news.ycombinator.com/item?id=11417059


I have a raspberry pi in my home network with an SSH server. I then just use Putty or Git Bash and ssh into the pi to do my Linux related work from Windows. I need to work a little more with systemd and block devices, so I didn't think WSL would cut it for me.

Constantly. Good enough to have switched from macOS to Windows 10 + WSL.

Like one other commenter, I use it with ConEmu.


Disk is very slow. Phoronix did some benchmarks recently, check them. Virtualbox is faster for some stuff, and more convenient.

I don't recall performance comparisons with Cygwin, which is still my default shell for Windows.


I tried it once a couple years ago. First thing I did was 'git status' in a large project.

I died waiting for it to finish and have since been reincarnated.


You should give WSL a try now - a couple of years ago would have been shortly after it was first released, when it was VERY early, and only barely able to run some of the more sophisticated tools you'd want/need.

WSL has come a LOOONG way since then, and yes, we are still working to improve disk IO perf.


Its damn good, I'd recommend it to anyone. Its missing a few features, but works as expected


Would you recommend WSL over a full linux distro, and if so, why? Not a rhetorical question. When I first heard about WSL, my first thought was: but why would people use this? I'm surprised it's so popular, and am just trying to understand what people find so compelling about WSL over the real thing.


I suppose it's good if you want to use windows applications and code inside linux at the same time. Other than that, having dual boot is probably better.




Applications are open for YC Winter 2019

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

Search: