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
69
votes
3 answers

.ssh directory not being created

To generate the .ssh dir I use this command: ssh-keygen taken from this tutorial: http://ebiquity.umbc.edu/Tutorials/Hadoop/05%20-%20Setup%20SSHD.html But the .ssh directory is not created so when I use cd ~/.ssh I get this error: "no such file or…
blue-sky
  • 51,962
  • 152
  • 427
  • 752
68
votes
1 answer

How to get the Windows path to Cygwin home directory?

How can I programmatically determine the current Cygwin user's home directory in Windows format (e.g. C:\cygwin\home\user) so I can read from it outside of Cygwin Bash?
bbodenmiller
  • 3,101
  • 5
  • 34
  • 50
67
votes
13 answers

Cygwin error: "-bash: fork: retry: Resource temporarily unavailable"

I recently reinstalled Cygwin on my computer in order to get access to several command line elements that I was missing. I have never had previous difficulty with Cygwin, but after this reinstallation, an error message continues to appear after…
David C
  • 7,204
  • 5
  • 46
  • 65
65
votes
4 answers

Control-r reverse-i-search in Bash: how do you "reset" the search in Cygwin?

How do you tell Ctrl + R reverse-i-search to "reset itself" and start searching from the bottom of your history every time? Background: When using reverse-i-search in Bash, I always get stuck once it is finished searching up through the history and…
dreftymac
  • 31,404
  • 26
  • 119
  • 182
65
votes
3 answers

Which of the cygwin mirror sites is complete?

I've noticed gross inconsistencies in the cygwin mirror sites. The packages that you get installed by default depend on which mirror you select. Even worse, some sites are missing important packages all together so you can't improve on the default…
Dean Schulze
  • 9,633
  • 24
  • 100
  • 165
64
votes
3 answers

Using Windows Python from Cygwin

I've been using Cygwin on Windows recently. I want to use the Windows installation of Python, so during testing I'm using /cygdrive/c/Python26/python.exe myfile.py rather than python myfile.exe. This is working almost perfectly, except for printing.…
Skilldrick
  • 69,215
  • 34
  • 177
  • 229
63
votes
4 answers

cygwin sets file permission to 000

I have a folder /cygwin/d/myfolder/ And everytime I save files there, from cygwin if i do an ls -la I see that the files are given permission 000. That actually causes me quite a bit of problem as I rsync this folder to my server and none of the…
user391986
  • 29,536
  • 39
  • 126
  • 205
62
votes
2 answers

Differences between MSYS2 and Cygwin

Traditionally MSYS bash has been considered inferior to Cygwin bash. The former was an ancillary tool inside MinGW intended for running autoconf scripts. But now there is MinGW-w64 and MSYS2. The latter ships with a sweet pacman like package…
antonio
  • 10,629
  • 13
  • 68
  • 136
60
votes
5 answers

A simple explanation of what is MinGW

I'm an avid Python user and it seems that I require MinGW to be installed on my Windows machine to compile some libraries. I'm a little confused about MinGW and GCC. Here's my question (from a real dummy point of view): So Python is language which…
Mridang Agarwalla
  • 43,201
  • 71
  • 221
  • 382
60
votes
5 answers

syntax error near unexpected token `$'in\r''

I'm trying to compile the NIST Biometric Image Software, and I have been having trouble all day. I finally got the source checked out right, and I installed cygwin with no problems (I have used it in the past), but when I went to compile, I get this…
David
  • 621
  • 1
  • 5
  • 4
60
votes
9 answers

VS Code - Cygwin as Integrated Terminal

I would like to use Cygwin as the integrated terminal on Visual Studio Code on my Windows laptop (as this would give me use of the Linux terminal commands git and G++, etc.) but when I set the value for "terminal.integrated.shell.windows": to the…
user2766296
  • 599
  • 1
  • 5
  • 9
60
votes
6 answers

Is it advisable to switch from Cygwin 32bit to Cygwin 64bit?

I've been using Cygwin (for a long time). Specifically, I use it (including gcc/g++) on Win7 for development work. I've just recently noticed there now exists a 64-bit version. I don't have a specific need which requires that I make the transition…
einpoklum
  • 118,144
  • 57
  • 340
  • 684
59
votes
4 answers

How to stop git from making files non-executable on cygwin?

I use git on Windows via cygwin and soon decided to use filemode=false (since otherwise I've got a lot of changes after the initial git clone). I'm definitely not interested in tracking permission at all, the only think I need is for some files to…
maaartinus
  • 44,714
  • 32
  • 161
  • 320
59
votes
3 answers

Bash variable assignment and command not found

I have a shell script that will let me access global variables inside the script, but when I try to create my own, it responds with: command not found. #!/bin/bash J = 4 FACE_NAME = "eig$J.face" USER_DB_NAME = "base$J.user" When I run the above…
CJ.
  • 593
  • 1
  • 4
  • 4
58
votes
14 answers

connecting to mysql from cygwin

I can successfully connect to MySQL from a DOS prompt, but when I try to connect from cygwin, it just hangs. $/cygdrive/c/Program\ Files/MySQL/MySQL\ Server\ 5.1/bin/mysql -u root -p What's wrong?
MCS
  • 22,113
  • 20
  • 62
  • 76