Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is cygwin and what does it do [closed]

Tags:

cygwin

mingw

msys

after searching about it i found some info (yet confusing for me)

Cygwin is a Unix-like environment and command-line interface for Microsoft Windows.

i found the above line in wikipedia but what does that mean? i'm not getting a clear idea about MinGW and cygwin and msys, please help

like image 932
Ario Avatar asked Mar 28 '14 08:03

Ario


People also ask

How do I close Cygwin?

When you are done using Cygwin/X, you can shutdown the X server by: Selecting the "Exit..." option from the notification area icon menu. In Windowed mode: Press Alt-F4 to shutdown the X Server.

Is Cygwin good for Windows?

Cygwin is a tool for users who regularly use Windows and Linux and want the power of Linux shell running within Windows. It is a very good alternative to Windows PowerShell and Windows Command Prompt. For example, Hadoop runs in the Linux operating system and most of the users have Windows-based laptops.

Is Cygwin still supported?

As of the creation of this article: Red Hat Cygwin is supported on all 32- and 64-bit versions of Windows since 2003 Server. Cygwin is available as both a 32- and 64-bit platform supporting 32 on 32-bit, 32 on 64-bit, and 64 on 64-bit installations.


2 Answers

Because it keeps confusing people:

  1. Cygwin: think of it as an OS. It provides a POSIX C runtime built on top of Windows so you can compile most Unix software to run on top of it. It comes with GCC, and to some extent, you can call the Win32 API from within Cygwin, although I'm not sure that is meant to happen or work at all.

  2. MSYS(2): a fork of Cygwin which has path translation magic to make native Windows programs work nicely with it. Its main goal is to provide a shell so you can run autotools configure scripts. You are not meant to build MSYS applications at all. Note that MSYS2 strives for much more and contains a full-blown package management system so you can easily install MinGW-w64 libraries and tools.

  3. MinGW(-w64): A native Windows port of the GCC compiler, including Win32 API headers and libs. It contains a tiny POSIX compatibility layer (through e.g. winpthreads, the unistd.h headers and some other bits), but you cannot compile POSIX software with this. This is best compared to MSVC, which also produces native code using the Win32 API.

Note that there are MinGW-w64 cross-compilers that run on Cygwin. With MSYS2, I frankly don't see a good reason to do that. Might as well run a VM with Linux if you're going to use Cygwin for that.

like image 52
rubenvb Avatar answered Oct 10 '22 18:10

rubenvb


More or less from its web page

cygwin is

  1. a POSIX compatibility layer on top of windows API. This is mainly encapsulated in a cygwin1.dll
  2. a distribution system and repository of open source software compiled with this dll.

In a nutshell, if you have a linux source, you can try to recompile for cygwin and be able to run it on windows...

This enables to have accessible many of the typical unix commands (shells, gcc/g++, find....)

Alternatives are:

  • MSYS: are a set of typical unix command implemented in windows.
  • mingw: A gcc/g++ target able to produce win32 programs (note that cygwin gcc/g++ programs will have a dependency on cygwin1.dll that mingw programs will not have).
like image 23
jsantander Avatar answered Oct 10 '22 18:10

jsantander