Ask HN: Is anyone using the Windows 10 Subsytem for Linux?
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
36 comments
[ 1.7 ms ] story [ 86.2 ms ] threadOther 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.
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.
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.
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
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!
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.)
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.
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.
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.
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
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.
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.
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.
Also, we added a decent amount of libusb support back in Creators Update: https://blogs.msdn.microsoft.com/commandline/2017/05/10/bash...
Like one other commenter, I use it with ConEmu.
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).
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.
* https://news.ycombinator.com/item?id=11417059
I died waiting for it to finish and have since been reincarnated.
WSL has come a LOOONG way since then, and yes, we are still working to improve disk IO perf.
I don't recall performance comparisons with Cygwin, which is still my default shell for Windows.
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.