What are the differences between Windows Bash and Cygwin?
Cygwin is a great tool if you want to live entirely in Windows and want to drive/automate Windows tasks with bash scripts. However, Cygwin is unable to run unmodified Linux binaries.
That's where WSL steps in:
The Windows Subsystem for Linux (WSL), is a new layer of the Windows kernel which aims to provide a high degree of compatibility with the Linux kernel ABI. This allows native, unmodified, Linux ELF64 binaries to run on WSL.
This is how WSL can run a genuine Ubuntu user-land distro, and any packages you download from apt-get, or .deb packages from elsewhere, without any changes.
The point of WSL is to enable developers working on Windows to be able to run many of the tools, and to work on many projects, which depend on Linux binaries, features, behaviors, filesystem layout, process model, etc.
While WSL is still early in its implementation, we're working hard to improve the breadth and depth of our syscall implementations to steadily improve WSL's ability to run an ever larger set of tools, and support a rapidly growing number of Ruby, Java, node, etc. packages and projects.
Update: 2017-09-07
Since writing the above, we've shipped Windows 10 Creators Update which MASSIVELY improves WSL's compatibility with MANY of the tools you'll want/need to run.
Development has also continued unabated and we've been shipping Win10 Insiders builds over the last few months on the way to the Fall Creators Update (FCU) shipping in Oct 2017.
In FCU, we're adding the ability to install and run more than one distro side-by-side: Ubuntu, openSUSE, and SLES are currently available, with Fedora and others on the way. WSL also now supports USB-serial comms, and mounting of USB-storage and network shares, along with further improvements to our syscalls which improves compatibility with more tools.
Update: 2019-08-22
It's been a very busy couple of years since first announcing and releasing WSL, then adding support for multiple distros via the store, and announcing WSL v1.0 HTH.
At Build 2019 we announced the new Windows Terminal (Terminal session video here) and WSL 2 (WSL 2 session video here) which introduces a whole new approach to running Linux on Windows.
For more details and future updates, be sure to visit the Windows Command-Line blog every couple of weeks where we post lots of related news
Windows Subsystem for Linux
I've been using WSL under Windows 10 for about a few months. Finally I can boot into Windows for gaming and still access the bash prompt and run CLI and many GUI programs. There are limitations such as none of the familiar Linux kernel virtual directories. Planning is required to share the same Bash script between Ubuntu and WSL on a dual boot machine.
There are lots of things I'd like to see improved, but I can live with it as is for a year or so.
Closed source
One thing to remember is Microsoft is a closed system, and you don't get the flurry of third parties writing updates like you enjoy on Linux. But all things considered you buy a new laptop and it comes with Windows 10 anyway so you could say it's "free" at least :)
Cygwin is controlled by Red Hat Linux which is not exactly known for giving things away for free either. Their "free" Linux distribution Fedora seems like a "testing ground" to some.
Maintenance cycles
Cygwin has 15 years of updates. Notable is the same project manager has been in place since 2003. There are lots of full time maintainers and many more volunteer contributors.
WSL provides major updates twice a year every spring and fall. Weekly minor updates are available to those on the Developers subscription list. Although Microsoft has resources to throw thousands of people into WSL development it appears you can count the team members with your fingers.
Speed issues
You'll see many complaints about WSL speed. For example, screen painting takes many times longer in Windows 10 versus Ubuntu 16.04, i.e. you can actually see the cursor move in Windows 10:
It takes about 5 seconds for the WSL Bash splash screen to paint. By comparison it is about 1 1/2 seconds for the same splash screen in Ubuntu 16.04:
Cygwin has its own share of speed complaints with Bash.
Original posting below for historical reference.
With Windows 10 Home, if it's 32 bit Windows, it means it won't run the 64-bit Ubuntu / Windows Subsystem as Microsoft tells us here: (windows Linux subsystem in win10 HOME BASIC).
It's like a dream come true running Ubuntu on Windows with its superior gaming support for Nvidia, but before you run out and buy a new (or used) laptop, make sure it has Windows 10 64 bit and not the 32-bit home version if you want to run Ubuntu / Linux stuff natively under Windows. On Microsoft websites they actually refer to the Windows Anniversary edition as a prerequisite to running Windows Subsystem for Linux.
However if you don't want to shell out $200+ for Windows 10 and you have an older laptop running Windows 8.1 64-bit like I do, and you have an even older laptop running Windows Vista 64 bit like I do, then Cygwin is the answer.
Cygwin supports more versions of Windows as their website lists:
Cygwin can be expected to run on all modern, released versions of Windows. State January 2016 this includes Windows Vista, Windows Server 2008 and all later versions of Windows up to Windows 10 and Windows Server 2016. The 32 bit version of Cygwin also runs in the WOW64 32 bit environment on released 64 bit versions of Windows, the 64 bit version of course only on 64 bit Windows.
Keep in mind that Cygwin can only do as much as the underlying OS supports. Because of this, Cygwin will behave differently, and exhibit different limitations, on the various versions of Windows.