What are the differences between Windows Bash and Cygwin?

The new update from Windows with "Linux" Bash is new, but what differences are there to Cygwin that might make you choose one over the other?

  • 1
    I suppose the windows bash is better integrated and better supported by Microsoft. – Panther Aug 18 '16 at 16:43
  • 2
    I think this question is on topic as Windows Bash is a Canonical supported product. It may be off topic as perhaps opinion rather then support. – Panther Aug 18 '16 at 16:59
up vote 60 down vote accepted

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.


HTH.

  • 9
    I've been a cygwin user for years. WSL is a fantastic idea that mostly runs well... however at this stage it's file access speed is dog slow. I'll say prohibitively slow. Doing even medium sized operations with something like GIT take in the order of 30+ seconds versus sub second on Cygwin. Hopefully they'll get to fixing that. – Damien Sawyer Jan 5 '17 at 10:30
  • 9
    Disk perf is a known issue: We're working on some perf improvements for Win10 CU, with more substantial improvements coming later in 2017. – Rich Turner Jan 6 '17 at 21:08
  • 3
    Fantastic. Can't wait. It's going to be a great product :-) – Damien Sawyer Jan 7 '17 at 7:41
  • 2
    @DamienSawyer it's been over 6 months. Have your speed complaints been lessened or are they still the same? – WinEunuuchs2Unix Sep 5 '17 at 23:32
  • 3
    @RichTurner then I will run the update :D – Martijn van Wezel Sep 12 '17 at 10:13

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:

WSL bash startup.gif

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:

Ubuntu terminal splash.gif

Cygwin has its own share of speed complaints with Bash.


Original posting below for historical reference.

The answer here is one year old, so I think a little update is in order. 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.

  • 1
    The question is what the differences between cygwin and bash for windows are. Cygwin isn't even mentioned in your answer. Please clarify how this answers the question. – Seth Sep 6 '17 at 5:27
  • @Seth I pointed out how WSL is version specific whereas Cygwin runs on all supported versions of WIndows. Thanks for pointing out my oversight. – WinEunuuchs2Unix Sep 6 '17 at 6:31
  • 1
    We've been very clear that WSL requires 64-bit Windows, and is available in every Windows 10 SKU, except current LTSB - WSL will be added to the next LTSB release. WSL is also going to be included in Windows Server released in fall 2017. – Rich Turner Sep 7 '17 at 19:35
  • @RichTurner Your website clearly spells it out. What's not clear to me (and not your fault) is why the vendor sells an i7 quad core 7700 with Nvidia 1050 GPU and 12 GB of system RAM with Windows 10 home. Someone deleted the original link but here it is. They do not spell out it's 32-bit. Are you saying every WIndows 10 is 64-bit? – WinEunuuchs2Unix Sep 7 '17 at 23:18
  • 1
    It's sold as a gaming PC. Since most gamers don't need the additional featuers in Win10 Pro, the opted for Home to save the customer from paying for something they'll likely not need. Windows 10 does come in 32-bit variants too for those that want it, but I'd be ASTONISHED if someone sold a machine with > 4GB RAM and installed a 32-bit OS since the OS and apps that it runs would not be able to access anything > 4GB. – Rich Turner Sep 9 '17 at 20:06

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.