Comment by ChuckMcM

8 years ago

These days you go to the Microsoft App store and download Ubuntu. It loads up actual bash and comes with everything you'd expect. (ssh being just one of the things). The terminal emulation is improving (there are still a couple of glitches) but pretty much all of my daily tools work exactly correctly.

For me, this is a huge thing.

When I bought my first Mac, back in the days of MacOS 10.2, I did so because of the BSD system underneath. Having a Unix system, whether its GNU or BSD, gives me access to tools that I'm familiar with and sometimes prefer to their GUI counterparts (e.g., scp/sftp vs FileZilla).

Now that Windows has this, switching back is something that I'm giving serious consideration to.

  • "Now that Windows has this, switching back is something that I'm giving serious consideration to."

    It's not clear to me that Windows has this ...

    I, like you, adopted the MacOS ecosystem because it was UNIX underneath ... but there's a big difference between underneath and alongside.

    Although it is not commonly done, you can control and interact with your OSX system with UNIX commands ... there's one single filesystem namespace and you can interact with it from the command prompt as well as kill GUI apps or set preferences or ifconfig, etc.

    It's my understanding that the Ubuntu subsystem in recent windows is sort of a parallel environment ... but is not meant to control the system directly or as an alternate path of interaction with Windows, correct ?

    • Alongside is an apt description. It feels a bit like running Linux in a Docker container.

      The Windows Subsystem for Linux (WSL) has it's own directory in the Windows filesystem that corresponds to /. It's uses some NTFS magic to store the Linux file attributes that don't directly correspond to NTFS file attributes.

      It also, within the Linux environment, mounts your host drives under /mnt.

      For what I generally use the OSX terminal for, WSL probably hits about 80-90% of my use cases. A lot of lower level utilities have weird issues - e.g., 'ip addr' seems to present the Windows network interfaces as though they were typical Linux ones, 'ss -a' gives a bunch of netlink errors, dmesg says "dmesg: read kernel buffer failed: Function not implemented", 'tcpdump' doesn't work, etc. On the other hand, curl, scp, ssh, etc do exactly what you'd expect.

      1 reply →

    • > It's my understanding that the Ubuntu subsystem in recent windows is sort of a parallel environment ... but is not meant to control the system directly or as an alternate path of interaction with Windows, correct ?

      I am not so sure about this. I think Dustin Kirkland sheds some more light here:

      http://blog.dustinkirkland.com/2016/03/ubuntu-on-windows.htm...

      And he seems to be relatively excited about it so he benched it more recently:

      https://www.linux.com/learn/howdy-ubuntu-windows-how-fast-it

      It seems more like an inverse Wine than a parallel environment.

    • To be completely fair to both sides though, the ability to tweak MacOS from terminal has always felt like it was opposed by Apple. They don't seem to support it officially in any capacity, and in many respects, actively fight it (i.e. changing the preference keys in every single release of MacOS, for literally no reason).

      You can do some things to and with MacOS from CLI. Honestly though, it's all stuff I wouldn't miss awfully.

    • In the early days there was less interaction but it's getting pretty seamless now.

      It's the same kernel underneath so it's not really two parallel systems.

I tried this, but I found that my Ubuntu subsystem could not access my wifi connection at all, no matter what I tried. I remember reading Microsoft forums where developers from Microsoft acknowledged they were working through the issue. It still hadn't been resolved the last time I checked.

I'm on a Dell XPS 15 9560 if that matters.

  • > I'm on a Dell XPS 15 9560 if that matters.

    It does as I've had no issues personally on as self-built desktop, an ASUS laptop, a MacBook running Bootcamp, and now a Surface Laptop.

Is there any advantages over using Ubuntu itself directly?

  • Well not if you aren't using other parts of Windows :-) but if you are constrained to using Windows for other reasons then the advantage is you get all the tools with a much lighter weight system than say running a virtual machine.

    There are also some systems where kernel support for the devices is lagging, either because they are proprietary and poorly documented or because they have insufficient market penetration to get someone interested in writing good driver support. For example support for the pen on the Surface Pro 4 line is really horrible (IMHO) on Linux.

    • So these devices need real kernel drivers? Windows doesn't provide some kind of emulation through its own drivers? I guess that makes sense although it didn't occur to me.

      If that's true, will those new drivers also work on a regular non-Windows Linux install? That would be really great news, and pretty ironic, if device manufacturers or even Microsoft itself were suddenly writing more/better drivers for the Linux kernel. :-)

      7 replies →

  • The big advantage is that it runs within Windows, so you can use your Windows and Linux tools at the same time. It's also not done as a virtual machine, so the Ubuntu running on Windows can access and manipulate files on your Windows system very easily.

    • Albeit very slowly. Unless they fixed it recently, writing to a vast amount of files is very slow compared to native Linux. Anyone who has cloned a large repository I'm sure is aware of this.

      5 replies →

I haven't done this yet, thanks for the reminder! I've been curious to try it as I've gone through probably every other bash emulator on Windows and not been overly satisfied.

  • I would love to hear how it works or doesn't work for you! I have shown it to lots of folks and probably a quarter have some aspect that keeps it from being perfect (generally a terminal issue or the lack of a Microsoft provided X server. For the latter I use xwin32 [1] which works fine but may not be accelerated if your display controller isn't supported.)

    [1] https://www.starnet.com/xwin32/

    • I'm just getting set up yet, but so far so good! I haven't run anything too complex just yet, but it seems really performant and doesn't put a significant load on my system.

      Next up is to try running something more taxing, and then look into GPU access from within it.

      I'm looking forward to them developing the subsystem further.

That's all fine and dandy until you want to develop Windows applications using Ubuntu on Windows.

There's still a place for windows native tools.