Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the difference between Cygwin on Windows and real UNIX environment

Tags:

unix

cygwin

I am a C/C++ developer. I have never done C++ programming on UNIX, I have done only on windows.

I want to practice C++ on Unix. (Because all big companies ask C++ with Unix).

I have a laptop on which I do not want to install any other OS (because I have installed very important software on it and I don't have setups)

So, I searched and found CygWin which is Unix emulator for Windows. I am thinking to practice C++ on this.

What will be the difference between Unix and Cygwin?

like image 783
Tarun Avatar asked May 12 '10 12:05

Tarun


1 Answers

Cygwin is mainly a POSIX emulator - where POSIX is some lowest common denominator of UNIX and other systems. This makes it possible to have cleanly written POSIX applications running on Windows.

You will find all things that are specified in POSIX (like the filesystem hierarchy, /proc filesystem, signals, sockets) in cygwin as well and it will behave within the POSIX specs. But as lots of things are unspecified in POSIX, it will not be 100% like any other real Unix system.

For example, on most UNIX systems, you can delete a file while it is open (which will make it a temporary file without name which will be deleted when the last user closes it). Windows does not allow this (and POSIX does not mandate it either); so on Cygwin you will have Windows file semantics (you cannot delete a file while it is open).

Same goes for allowed characters in filenames, filename case sensitivity, and (of course) all the additional APIs (besids POSIX) that most real UNIXes offer but which are not included in Cygwin.

(At least you can have a X server in Cygwin, which does again only support the basic X operations).

like image 67
mihi Avatar answered Sep 29 '22 12:09

mihi