I have failed to get my first patch to implement. I loaded cygwin, maneuver to the directory, and enter patch -p0 < ThePatchName.patch

Cygwin returns bash: patch: command not found

I searched the cygwin/bin directory and there is an executable for pathk.exe, but not patch.exe. I cannot find documentation on these commands at cygwin, so I do not know if they are the same. Does anyone know about this?


This is not quite a Drupal question. That said, patch for Cygwin needs to be installed. Rerun your Cygwin "setup" program, and search for "patch". In my setup, it is under the "Utils" category. Once you find it, select it and then hit "Next" to finish the install. It should be available.

  • You answered while I was writing my answer. Thank you! – Ashlar Nov 16 '11 at 20:19

What I did:

Patch is not automatically installed. I went to cygwin.com/install.html, selected cygwin packages menu item, reloaded setup.exe and found patch buried in a long list of commands. after installing it, everything worked.

There are a couple of problems to watch out for using cygwin.

Moving to the directory in using this linux tool is different than DOS. Enter this: cd /cygdrive/c/theRestofthePath. Note that it does not recognize spaces unless they are preceded by a backslash.

The patch command is: patch -p0


Use: apt-cyg install patch. (It's in its own package.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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