Live data from Hacker News

What’s New in Bash/WSL and Windows Console

blogs.msdn.microsoft.com

241–250 of 251 posts

Re: What’s New in Bash/WSL and Windows Console

#241
post #218
post #208

Earlier quoted context omitted.

> Some person's half maintained fork of putty is some person's half maintained fork of putty and we already have Windows openssh for SSH purposes. I wonder if an MS port/fork/patch-set contribution to putty might not be the best way to a great windows console host. At least until there's a native port of libvt. Putty gets a lot of the console handling right - while win64/32 openssh is pretty outdated and lagging as a…

Windows OpenSSH is excellent - use the one Microsoft maintain.

That would be:

https://github.com/PowerShell/Win32-OpenSSH ?

Re: What’s New in Bash/WSL and Windows Console

#242
post #20

Earlier quoted context omitted.

A lot of resistance some will have to WSL will be old battle scars from Microsofts past behaviour. Microsoft have done a lot over the years to troll the Linux community. While many of the younger HN members will be familiar with the "new open source Microsoft" some of us oldies have had to endure IE breaking the web plus ActiveX / Silverlight and other MS web lockins. Comments like "open source is communism" from top…

> IE breaking the web For several years it was the best browser available. Invented a lot of things, including DOM and XMLHttpRequest. > ActiveX / Silverlight and other MS web lockins Everybody did that. Have you forgot internet with A/V streaming locked to RealNetworks, and vector graphics and animation locked to Macromedia?

IE4 was better than Netscape communicator but not significantly. Before (IE3 and below) things were a lot more even. However by IE4 MS had already won the browser wars. It was a fair while after that point when AJAX became a thing (and Netscape and Opera did support a competing API to XMLHttpRequest btw). The problem with IE was that it wasn't standards compliment, only ran on Windows desktop and Mac (even Windows CE didn't really have a decent working version of IE) and even with their lack of regard for the standards offer very little innovation compared to the 10 years they had leading the market. Think about how much the web advanced once Firefox and Chrome gained traction and how far behind IE quickly got left, then tell me that what Microsoft did for web was a positive thing.

Real Player and Flash were cross platform (albeit Flash outside of Windows was and still is garbage). ActiveX was Internet Explorer on Windows desktop only and Silverlight was only partially cross platform (parts of Silverlight was ported to OSX and only OSX so it's a bit of a stretch to even compliment Silverlight for being "partially" cross platform).

Re: What’s New in Bash/WSL and Windows Console

#243

Earlier quoted context omitted.

That's specific to a Windows implementation. bash is GNU bash, on every operating system. A Unix shell. It has been the same since 1989. The authority on what GNU bash is and what it is not is GNU, not Microsoft. Then GNU bash is not required to run stuff under Linux. There are system calls to run programs. e.g: http://man7.org/linux/man-pages/man2/execve.2.html Many distros do not even ship with GNU bash. The limita…

I'm curious as to whether you realize that you've now taken so strong a position on this issue that you've blinded yourself to the evidence? I just gave you some information that showed that, the center of activity for Creators Edition is Bash. Bash is the only way that you can launch your linux subsystem on windows. Lots of work has been done on this Bash environment. It's entirely reasonable for Microsoft to say, "…

Stop adding noise/personal remarks and stick to relevant information.

> Bash is the only way that you can launch your linux subsystem on windows

For now. On Windows only. Bash has never been a requirement to run Linux software, they're not coupled in any way.

> Bash is not just a Unix Shell in Microsoft's particular implementation

Then it's no longer GNU bash. It's something else. Feel free to invite Microsoft to provide a new, non-ambiguous name for it. And then rename their binary: .exe so users like yourself don't get confused.

In addition, Microsoft should not couple the ABI with a particular shell. There are many shells and people should be able to select the one they prefer.

Finally, if WSL cannot run bash's unmodified Linux binary, then WSL is a leaky abstraction and not a true Linux ABI. In that case you are better off just running Linux from a VM for the time being.

Re: What’s New in Bash/WSL and Windows Console

#245

Earlier quoted context omitted.

I'm curious as to whether you realize that you've now taken so strong a position on this issue that you've blinded yourself to the evidence? I just gave you some information that showed that, the center of activity for Creators Edition is Bash. Bash is the only way that you can launch your linux subsystem on windows. Lots of work has been done on this Bash environment. It's entirely reasonable for Microsoft to say, "…

Stop adding noise/personal remarks and stick to relevant information. > Bash is the only way that you can launch your linux subsystem on windows For now. On Windows only. Bash has never been a requirement to run Linux software, they're not coupled in any way. > Bash is not just a Unix Shell in Microsoft's particular implementation Then it's no longer GNU bash. It's something else. Feel free to invite Microsoft to pro…

Okay - you make some good points, and I'm coming around to seeing things your way. Note that the bash (the shell) that you are running inside WSL appears to be binary identical to a stock ubuntu distro - so from that perspective, the bash you are running turns out to be exactly GNU bash, totally unmodified.

  shephard@singtest:~$ uname -a
  Linux singtest 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
  shephard@singtest:~$ ls -lart /bin/bash
  -rwxr-xr-x 1 root root 1037528 Jun 24  2016 /bin/bash
  shephard@singtest:~$

  root@Skully:~# uname -a
  Linux Skully 4.4.0-43-Microsoft #1-Microsoft Wed Dec 31 14:42:53 PST 2014 x86_64 x86_64 x86_64 GNU/Linux
  root@Skully:~# ls -lart /bin/bash
  -rwxr-xr-x 1 root root 1037528 Jun 24  2016 /bin/bash

 
And once WSL has been fired up, you can run any shell you want to .

  root@Skully:~# fish
  Welcome to fish, the friendly interactive shell
  Type help for instructions on how to use fish

Reading around the web - I note that Microsoft appears to be very careful about referring to "Bash/WSL" as a joint unit to refer to the Bash.exe component of WSL. Perhaps everyone on this thread (minus you and a few others) are the ones who are confused - perhaps the "Bash.exe" in Bash/WSL really is completely unrelated to "bash" the Bash shell? It may be the case that when I type "Bash.exe" from the start menu on Windows, the binary I'm running is completely unrelated to "bash" the linux shell - and this entire thing is a branding exercise. (as I think you've very patiently been trying to point out). Perhaps it would have made more sense to rename "Bash.exe" to "wsl.exe" - but then they wouldn't have been able to ride on Bash's branding...

The following link makes the distinction clear:

https://msdn.microsoft.com/en-us/commandline/wsl/faq

It's kind of Ironic when the one person being downvoted to oblivion for several days turns out to be the only one correct. But at least you won over one person. I'll never refer to it as anything other than WSL - and correct people who think they are running Bash (the GNU shell) when they type "Bash.exe."

Thanks.

Re: What’s New in Bash/WSL and Windows Console

#246

Bash for Windows... Bash is a Unix shell. Linux is an operating system. Completely different concepts. Bash on Windows has existed for decades now, through Cygwin. https://cygwin.com/cgi-bin2/package-cat.cgi?file=x86_64%2Fba... Trying to reduce the entire GNU/Linux ecosystem to "Bash" is insulting to the community you are trying to appeal to: Linux is an immensely large and complex project, which has millions of line…

For anybody comes to this thread late - partycoder is 100% correct. The Bash.exe component of Bash/WSL is entirely unrelated to the bash shell (that gets executed inside the WSL subsystem) - should have been named wsl.exe. Microsoft is just trying to ride (mostly successfully) for free on all of Bash's goodwill.

I will note, that Microsoft, when referring to their WSL component, never refers to it as Bash - and always "Bash/WSL" - though it's dubious as to whether that's even meaningful (unless they are trying to say once you start WSL you can run bash. But you can also run fish. Or any other shell.

Re: What’s New in Bash/WSL and Windows Console

#247
post #9

Bash for Windows... Bash is a Unix shell. Linux is an operating system. Completely different concepts. Bash on Windows has existed for decades now, through Cygwin. https://cygwin.com/cgi-bin2/package-cat.cgi?file=x86_64%2Fba... Trying to reduce the entire GNU/Linux ecosystem to "Bash" is insulting to the community you are trying to appeal to: Linux is an immensely large and complex project, which has millions of line…

Your entry point to WSL is bash and while you may be able to compile and install other shells, calling it "bash" isn't too far from the truth. Really the awkwardness of the naming is more of a testament to the power of scripting on Unix-like OSs (eg how scripting is a first class citizen and how most of the ecosystem is modelled around CLI, and thus scripting, support) more than it is an insult. As for cygwin, that w…

The confusion is that the "Bash.exe" that you run to initiate the WSL subsystem is entirely unrelated to the bash, the shell that gets executed in that subsystem. In the cygwin scenario, when you ran bash.exe - you really are running the bash shell.

Re: What’s New in Bash/WSL and Windows Console

#248
post #82

Earlier quoted context omitted.

Bash is merely a Unix shell, one of many. What you describe is the GNU/Linux userland. They are working on people being able to execute unmodified Linux binaries on Windows machines through an Application Binary Interface that implements the Linux system calls and translates them into Windows system calls, among other things... and doing it in the most transparent way possible (not requiring specific builds of each s…

Everyone you're replying to understands how WSL and UNIX shells work. The error is on your part because you keep misunderstanding that the Windows executable one runs to invoke WSL is literally C:\Windows\System32\bash.exe Sure, once you've started bash you can then probably switch to whichever shell you want afterwards (NOTE: I say that but I've not tested to see if other shells work). But to use your WINE example,…

The problem is, that C:\Windows\System32\bash.exe has nothing whatsoever to do with bash, the GNU shell. They are entirely unrelated. C:\Windows\System32\bash.exe is the component which initiates the WSL subsystem. With cygwin, when you run bash.exe - you are literally running the bash shell compiled for windows. Once C:\Windows\System32\bash.exe starts up, it then launches bash - the GNU shell.

Re: What’s New in Bash/WSL and Windows Console

#249
post #98
post #85

WOW. cmd can actually parse escape codes now AND run Linux scripts! What a time to be alive. I've been using WSL for the last year now on my Surface Pro 4, and it has been nothing short of fantastic. This bridges a HUGE gap that made the MacBook attractive.

cmd has nothing to do with it. Just as bash has nothing to do with parsing terminal escape sequences. It's a shell. On Unix-likes a terminal or ~ emulator will handle those escape sequences, on Windows it's the console (provided by conhost). What program you run in the console (or terminal) is completely irrelevant.

you are right that conhost and bash are separate, but what i am saying is that conhost never supported color escape codes.

Re: What’s New in Bash/WSL and Windows Console

#250

Earlier quoted context omitted.

Stop adding noise/personal remarks and stick to relevant information. > Bash is the only way that you can launch your linux subsystem on windows For now. On Windows only. Bash has never been a requirement to run Linux software, they're not coupled in any way. > Bash is not just a Unix Shell in Microsoft's particular implementation Then it's no longer GNU bash. It's something else. Feel free to invite Microsoft to pro…

Okay - you make some good points, and I'm coming around to seeing things your way. Note that the bash (the shell) that you are running inside WSL appears to be binary identical to a stock ubuntu distro - so from that perspective, the bash you are running turns out to be exactly GNU bash, totally unmodified. shephard@singtest:~$ uname -a Linux singtest 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_…

Fair enough. Hope you can un-downvote the ones you downvoted. While comparing binaries by size can help, I recommend comparing binaries by hashing them (e.g: sha1sum). Usually better in terms of security.
Post reply on HN