Linux and Windows don't mix - or at least they didn't before Cygwin. This tutorial shows how to set up a Linux emulator running on Microsoft Windows.
Any Windows user can incorporate Linux into their own PC just by installing a single application - Cygwin.
Cygwin is a Linux emulator for Microsoft Windows, and as such does not support native Linux applications - in order for them to run they need to be ported to Windows, and this normally normally means rebuilding the application using Cygwin.
Fortunately there have been a lot of very busy people and so the list of Linux tools and applications available to Cygwin is extensive.
Cygwin installation is very simple and straightforward - the installation program can be found on the Cygwin web site - http://cygwin.com/; and then it's just a matter of doing the following:
At the end of the process a 'default' system will have been installed - this consists of the minimum set of applications that is needed to emulate Linux.
Once installed Cygwin can be started in any one of three ways:
The user will now be using Linux.
There are far too many Linux tools to cover here, but one powerful element worth mentioning is Linux's file processing abilities. For example, the struture of one file - /etc/passwd/ - is quite complex:
$ cat /etc/passwd
admin:use_crypt:500:544:Administrator:/home/admin:/bin/bash
bainm:use_crypt:552:544:bainm:/home/bainm:/bin/bash
However, Linux tools such as gawk can extract data very easily:
$ gawk -F: '{print $1,$6}' /etc/passwd
admin /home/admin
bainm /home/bainm
In this example gawk has been instructed to use the colon as a field separator and then print the first and sixth fields.
Cygwin will have been installed in it's 'default' configuration - that's to say with the minimum number of tools needed to simulate a basic Linux system. However, more tools can be added as necessary, for example a few useful tools that are not installed by default are:
If any other tools are require then the user only has to rerun the installation program (setup.exe will have been downloaded during the installation process), and then selecting the appropriate files.
Every Windows user knows that the main drive in their PC is C: - but such a concept does not exist under Linux - on Linux there is no C: drive. However, this isn't a problem - Cygwin uses it's own mapping - C: is simply refered to as /cygdrive/c thereby allowing access to all files on the system.
Cygwin, of course, is not Linux - it can't be; however, for anyone that has to stay with Microsoft Windows but still wants to benefit from the power of Linux then Cygwin is the perfect compromise.