What is the difference between Cygwin on Windows and a real UNIX environment

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

I want to practice C ++ on Unix. (Because all major companies are asking for C ++ with Unix).

I have a laptop on which I do not want to install any other OS (because I installed very important software on it, and I have no settings)

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

What is the difference between Unix and Cygwin?

+4
source share
4 answers

Cygwin is basically a POSIX emulator, where POSIX is the lowest common denominator of UNIX and other systems. This allows you to have purely written POSIX applications running on Windows.

In cygwin you will find everything that is specified in POSIX (for example, the file system hierarchy, proc file system, signals, sockets) and will behave within the POSIX specifications. But, since there are a lot of things not specified 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 a name, which will be deleted when the last user is closed). Windows does not allow this (and POSIX does not provide this); so on Cygwin you will have the semantics of the Windows file (you cannot delete the file while it is open).

The same goes for permitted characters in file names, file case sensitivity, and (of course) all additional APIs (besides POSIX) that most real UNIXs offer but that are not included in Cygwin.

(At the very least, you may have an X server in Cygwin that only supports basic X operations again).

+4
source

Cygwin simply has a subset of the functionality of the real Unix operating system, and there are certain things you need to know about the Unix OS that cygwin will not tell you. It depends on what you need to do on a Unix machine. Because it has a different file system and does not have the same directory structure as Windows. For example, Unix does not have β€œprogram files,” and you may need to know where a large number of files are located that you do not recognize in cygwin. Although I agree, if you do not want to install another OS on your computer, you can install it in a virtual machine or just use it every time, and then you can just use liveCD

+2
source

You may find this link useful: http://en.wikipedia.org/wiki/Cygwin

They provide a lot of useful information to help you better understand what comes next.

My advice would be to virtualize your own environment (e.g. using Ubuntu inside Virtual Box). Google to get download links

You can experiment with your heart content.

+1
source

Download VirtualBox , then install the Unix flavor of your choice. Personally, I am a big fan of Ubuntu. :)

Although Cygwin is pretty good at what it does, it will not be the same as working directly on a Unix machine.

0
source

Source: https://habr.com/ru/post/1309555/


All Articles