r/programming • • Mar 30 '16

Microsoft is bringing the Bash shell to Windows 10

http://techcrunch.com/2016/03/30/be-very-afraid-hell-has-frozen-over-bash-is-coming-to-windows-10/
5.5k Upvotes

1.2k comments sorted by

View all comments

224

u/serve11 Mar 30 '16

FINALLY. Cygwin is a solid effort, but its still missing too many features. It's about damn time Windows had a supported bash shell.

89

u/IDUnavailable Mar 30 '16 edited Mar 30 '16

So maybe I'm retarded, but... Will I be able to write POSIX compliant C/C++ code that can compile and run on Windows as well as Linux? Is that what's being implied? Because that sounds fantastic (without messing with cygwin).

122

u/3rg0s4m Mar 30 '16

Rumor has it that its a full linux subsystem ... so yes

39

u/the_gnarts Mar 30 '16

Rumor has it that its a full linux subsystem ... so yes

“Full Linux subsystem”—as in “has netlink”, “has netfilter”‽ Or is it another thin POSIX layer?

19

u/postmodest Mar 30 '16

This is the key question. Is this just SUA v.2? (or... 4? 6? IIRC SUA was "SFU v. 4") SUA's network support was poor.

1

u/x2040 Mar 31 '16

For the less intelligent among us can you explain what this is

2

u/the_gnarts Mar 31 '16

For the less intelligent among us can you explain what this is

https://en.wikipedia.org/wiki/Windows_Services_for_UNIX

→ More replies (1)

1

u/bonzinip Mar 31 '16

Yes, it is.

13

u/gsnedders Mar 31 '16

It seems to be an implementation of the Linux syscall interface, along with a few other things (at least some of procfs and presumably devfs). Anything purely in kernel space with no API presumably won't exist.

1

u/the_gnarts Mar 31 '16

It seems to be an implementation of the Linux syscall interface

So it’s like NetBSD’s Linux emulation, then? That gets you very far indeed: Binaries like Acroread and Opera work out of the box. Linux is more than that, though.

→ More replies (2)

6

u/svick Mar 31 '16

It's not just POSIX. It directly runs Linux binaries.

1

u/jb2386 Mar 31 '16

Nice use of the interrobang.

1

u/Badabinski Mar 31 '16

Oh Lord, if it has Netlink...

→ More replies (1)

1

u/tyoverby Mar 31 '16

If you give me an example of a package that uses netlink or netfilter, I'll try it on my machine and report back.

→ More replies (2)

0

u/[deleted] Mar 31 '16

[deleted]

5

u/Merwco Mar 31 '16

So they don't need to change anything?

1

u/am0x Mar 31 '16

This is amazing. I can finally fonall my development in Windows.

1

u/playaspec Mar 31 '16

Rumor has it that its a full linux subsystem

If it isn't running the Linux kernel, it ain't Linux.

13

u/wildcarde815 Mar 30 '16

Technically you've been able to do that with the POSIX compatibility layer up to this point. Sounds like they took that, built all the framing you'd need for Ubuntu 14 on top of it and went from there.

2

u/interfect Mar 31 '16

It looks like you compile just for Linux, and then Windows pretends to be Linux and loads the ELF and responds to the Linux syscall ABI.

2

u/zvrba Mar 31 '16

If you test your "POSIX" code only on Linux, chances are it's not POSIX.

1

u/interfect Mar 31 '16

It looks like you compile just for Linux, and then Windows pretends to be Linux and loads the ELF and responds to the Linux syscall ABI.

→ More replies (10)

2

u/svick Mar 31 '16

No more setup.exe? No more setup.exe!

1

u/Purpledrank Mar 31 '16

cygwin is a port right? It's kind of similar to the reverse scenario of using WINE. Technically they are not the same but, the outcome is sometimes. Various cygwin ports are broken (such as lftp) and will hang on windows.

I used to get by on cygwin but left for its poor terminal emulator aesthetics/readability (ming32). Coreutils was the only really supported packages. Other software could easily have issues and wasn't native.

→ More replies (80)