Questions tagged [cygwin]

Cygwin is a collection of GNU and other Unix-like FOSS tools which run on MS Windows and provide functionality similar to a GNU/Linux distribution while (mostly) conforming to POSIX specifications. Use this tag for questions about developing programs and/or scripts to run in this environment. Questions on the *use* of tools in a Cygwin environment are more appropriate for Super User (https://superuser.com).

Cygwin is a Unix-like environment and command-line interface for Microsoft Windows. Cygwin provides native integration of Windows-based applications, data, and other system resources with applications, software tools, and data of the Unix-like environment. Thus it is possible to launch Windows applications from the Cygwin environment, as well as to use Cygwin tools and applications within the Windows operating context.

Cygwin consists of two parts: a dynamic-link library () as an API compatibility layer providing a substantial part of the API functionality, and an extensive collection of software tools and applications that provide a Unix-like look and feel.

Cygwin is:

  • a collection of tools which provide a Linux look and feel environment for Windows.
  • a DLL (cygwin1.dll) which acts as a Linux API layer providing substantial Linux API functionality.

Cygwin is not:

  • a way to run native Linux apps on Windows. You must rebuild your application from source if you want it to run on Windows.
  • a way to magically make native Windows apps aware of UNIX® functionality like signals, `ptys, etc. Again, you need to build your apps from source if you want to take advantage of Cygwin functionality.

The Cygwin DLL currently works with all recent, commercially released x86 32 bit and 64 bit versions of Windows, with the exception of Windows CE and Windows NT4.

Official Website: http://www.cygwin.com/

Useful Links:

7878 questions
769
votes
17 answers

What is the difference between Cygwin and MinGW?

I want to make my C++ project cross platform, and I'm considering using Cygwin/MinGW. But what is the difference between them ? Another question is whether I will be able to run the binary on a system without Cygwin/MinGW ?
Łukasz Lew
  • 48,526
  • 41
  • 139
  • 208
649
votes
37 answers

How can I set up an editor to work with Git on Windows?

I'm trying out Git on Windows. I got to the point of trying "git commit" and I got this error: Terminal is dumb but no VISUAL nor EDITOR defined. Please supply the message using either -m or -F option. So I figured out I need to have an…
Patrick McElhaney
  • 57,901
  • 40
  • 134
  • 167
475
votes
42 answers

fatal: early EOF fatal: index-pack failed

I have googled and found many solutions but none work for me. I am trying to clone from one machine by connecting to the remote server which is in the LAN network. Running this command from another machine cause error. But running the SAME clone…
William
  • 5,526
  • 6
  • 20
  • 42
454
votes
10 answers

How to check if running in Cygwin, Mac or Linux?

I have a shell script that is used both on Windows/Cygwin and Mac and Linux. It needs slightly different variables for each versions. How can a shell/bash script detect whether it is running in Cygwin, on a Mac or in Linux?
bastibe
  • 16,551
  • 28
  • 95
  • 126
445
votes
28 answers

Using awk to print all columns from the nth to the last

This line worked until I had whitespace in the second field: svn status | grep '\!' | gawk '{print $2;}' > removedProjs Is there a way to have awk print everything in $2 or greater? ($3, $4.. until we don't have any more columns?) I'm doing this…
Andy
  • 44,610
  • 13
  • 70
  • 69
427
votes
13 answers

How to navigate to a directory in C:\ with Cygwin?

I'm trying to install PyQt4 so I can mess around with it. The installation guide said I had to install Sip. The last step to installing Sip is to use the make install command. Windows doesn't have that, so I looked it up and everything I saw said to…
Andrew
  • 12,172
  • 16
  • 46
  • 61
407
votes
31 answers

SSL certificate rejected trying to access GitHub over HTTPS behind firewall

I'm stuck behind a firewall, so I have to use HTTPS to access my GitHub repository. I'm using Cygwin 1.7.7 on Windows XP. I've tried setting the remote to https://username@github.com/username/ExcelANT.git, but pushing prompts for a password, but it…
oharab
  • 4,405
  • 3
  • 19
  • 15
395
votes
17 answers

'\r': command not found - .bashrc / .bash_profile

I have windows, using Cygwin, trying to set JAVA_HOME permanently through my .bashrc file. .bashrc: export PATH="$JAVA_HOME/bin:$PATH" export JAVA_HOME=$JAVA_HOME:"/cygdrive/c/Program Files (x86)/Java/jdk1.7.0_05" .bash_profile: if [ -f…
Jasmine
  • 4,364
  • 3
  • 16
  • 16
375
votes
19 answers

Git on Windows: How do you set up a mergetool?

I've tried msysGit and Git on Cygwin. Both work just fine in and of themselves and both run gitk and git-gui perfectly. Now how the heck do I configure a mergetool? (Vimdiff works on Cygwin, but preferably I would like something a little more…
Jake
  • 15,007
  • 22
  • 70
  • 86
349
votes
15 answers

Git Extensions: Win32 error 487: Couldn't reserve space for cygwin's heap, Win32 error 0

Git Extensions: Everything was working fine until yesterday. But suddenly I am get this error when I try to pull some repositories using git extensions C:\Program Files\Git\bin\git.exe pull --progress "origin" Done 0 [main] us 0 init_cheap:…
Uchia Itachi
  • 5,287
  • 2
  • 23
  • 26
284
votes
3 answers

Regex (grep) for multi-line search needed

I'm running a grep to find any *.sql file that has the word select followed by the word customerName followed by the word from. This select statement can span many lines and can contain tabs and newlines. I've tried a few variations on the…
Ciaran Archer
  • 12,316
  • 9
  • 38
  • 55
253
votes
25 answers

SSH Private Key Permissions using Git GUI or ssh-keygen are too open

Recently I've been unable to clone or push to github, and I'm trying to find the root cause. This is on windows I have cygwin + git as well as msysgit. Msysgit was installed with the following options: OpenSSH Use Git from Windows Command…
Ben Scheirman
  • 40,531
  • 21
  • 102
  • 137
249
votes
29 answers

Open Cygwin at a specific folder

How can I create a Cygwin shortcut that will open Cygwin at a specific folder? This would obviate having to type cd /cygdrive/c/Users/Tom/Desktop/ each time I launch Cygwin.
Randomblue
  • 112,777
  • 145
  • 353
  • 547
232
votes
14 answers

Objective-C for Windows

What would be the best way to write Objective-C on the Windows platform? Cygwin and gcc? Is there a way I can somehow integrate this into Visual Studio? Along those lines - are there any suggestions as to how to link in and use the Windows SDK for…
Luther Baker
  • 7,236
  • 13
  • 46
  • 64
219
votes
5 answers

Git on custom SSH port

My VPS provider recommends that I leave my SSH port to the custom port number they assign it by default (not 22). The thing is, while I know I can provide the port number when creating a remote config, it seems I can't do the same when doing a Git…
ryanzec
  • 27,284
  • 38
  • 112
  • 169
1
2 3
99 100