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
210
votes
14 answers

How do I fix certificate errors when running wget on an HTTPS URL in Cygwin?

For example, running wget https://www.dropbox.com results in the following errors: ERROR: The certificate of `www.dropbox.com' is not trusted. ERROR: The certificate of `www.dropbox.com' hasn't got a known issuer.
Russell Davis
  • 8,319
  • 4
  • 40
  • 41
208
votes
9 answers

How do I install cygwin components from the command line?

Is there a tool in the Cygwin package similar to apt-get on Debian or yum on redhat that allows me to install components from the command line?
vy32
  • 28,461
  • 37
  • 122
  • 246
201
votes
10 answers

How do I get the 'clear' command in Cygwin?

I installed Cygwin, choosing a fairly minimal set of packages. In a terminal, I tried to do 'clear' to clear the terminal, but I get bash: clear: command not found How do I get this to work?
192
votes
4 answers

How set multiple env variables for a bash command

I am supposed to set the EC2_HOME and JAVA_HOME variables before running a command (ec2-describe-regions) How do I do that in one go?
SamLosAngeles
  • 2,660
  • 2
  • 14
  • 12
176
votes
37 answers

Git push hangs when pushing to Github?

Git push hangs everytime I try to push to github. I am using Cygwin and Windows 7. Git functions fine locally tracking branches, providing status, setting global user.name and user.email and allowing commits. I'm still new and learning. I enter git…
Matt Singer
  • 1,917
  • 2
  • 14
  • 12
171
votes
18 answers

Root user/sudo equivalent in Cygwin?

I'm trying to run a bash script in Cygwin. I get Must run as root, i.e. sudo ./scriptname errors. chmod 777 scriptname does nothing to help. I've looked for ways to imitate sudo on Cygwin, to add a root user, since calling "su" renders the…
Ken Bellows
  • 6,711
  • 13
  • 50
  • 78
146
votes
7 answers

apt-get for Cygwin?

Is there any apt-get-like program for use with Cygwin? I already tried cyg-apt but when I try I get this error: cyg-apt: downloading: http://cygwin.mirrors.pair.com/setup-2.bz2 cyg-apt: downloading:…
Hyztname
  • 1,597
  • 2
  • 10
  • 7
145
votes
17 answers

How do I install cURL on cygwin?

I tried to enable curl on cygwin but it says bash: curl: command not found How do I install curl on cygwin?
Drew LeSueur
  • 19,185
  • 29
  • 89
  • 106
133
votes
7 answers

How can I change my Cygwin home folder after installation?

I just installed Cygwin, and it looks like the home directory in the bash prompt is on my Z: drive. That's not where I want it. How can I change this?
Nathan Long
  • 122,748
  • 97
  • 336
  • 451
116
votes
7 answers

Open a file from Cygwin

Is there an equivalent to OSX open command in cygwin. open opens a file with the default application for that type. I want to do something like $ magic-command file.xls #excel opens as if file.xls would have been double-clicked $ magic-command…
Mo.
  • 15,033
  • 14
  • 47
  • 57
112
votes
4 answers

How can I install MinGW-w64 and MSYS2?

I am trying to build some open source library. I need a package management system to easily download the dependencies. At first I am using MinGW and MSYS. But the included packages are limited. Someone told me to use Mingw-w64 and MSYS2. I…
smwikipedia
  • 61,609
  • 92
  • 309
  • 482
106
votes
8 answers

How do you run a crontab in Cygwin on Windows?

Some cygwin commands are .exe files, so you can run them with the standard Windows Scheduler, but others don't have an .exe extension so can't be run from DOS (it seems like). For example I want updatedb to run nightly. How do I make cron work?
user10306
  • 1,113
  • 2
  • 8
  • 8
106
votes
9 answers

Split text file into smaller multiple text file using command line

I have multiple text file with about 100,000 lines and I want to split them into smaller text files of 5000 lines each. I used: split -l 5000 filename.txt That creates files: xaa xab aac xad xbe aaf files with no extensions. I just want to call…
ashleybee97
  • 1,205
  • 3
  • 11
  • 8
104
votes
5 answers

Why does find -exec mv {} ./target/ + not work?

I want to know exactly what {} \; and {} \+ and | xargs ... do. Please clarify these with explanations. Below 3 commands run and output same result but the first command takes a little time and the format is also little different. find . -type f…
Shahadat Hossain
  • 2,542
  • 3
  • 17
  • 13
87
votes
6 answers

Installing Pip-3.2 on Cygwin

I have Python 3 installed on Cygwin. However, I am unable to install Python 3 packages via pip. Is there a way to do this?
David Y. Stephenson
  • 872
  • 4
  • 22
  • 44