Tuesday, February 15, 2011

Cygwin:- What is Cygwin & How to set up?

 "Cygwin is a Unix-like environment and command-line interface for Microsoft Windows" says Wiki. Programmers who wants to practice Unix usually install RedHat Linux in their PC's usually as a dual-boot or through VM. This process demands us to completely boot the OS before we start working. For users who are interested only in programming like C, C++, Java, Shell scripting, Perl scripting, etc.. we dont need to install the entire RedHat linux at all. Cygwin is the perfect alternative for you. Cygwin is a utility like any windows software. Once cygwin is installed, working on Unix is just like working on say a Microsoft word document. Just double click on the shortcut and you are inside the terminal. No need to wait for booting, etc. Cygwin installs every Unix command like a windows executable and hence invokes just like any windows utility.

  Let us see in this article how to install cygwin:

1. Download the setup from the Cygwin site.
2. Run the Set up.
3. In the Choose Installation type screen, choose "Install from Internet".
4. In the Select Root Directory screen, choose any directory where you want to Install. Usually, we choose C.
5.Choose any directory in the Choose Local package directory screen.
6. Choose Direct connection in the Select connection type.
7. Choose any site in the Select Download site screen.
8. Next is the Select Packages screen. This is the most important of all. By default, Cygwin does not install quite a few commands in the programmers interest like vi editor, gcc compiler, etc. So, make sure to go over the default list and search and add the other utilities you would like to add.
9. Once finished installation, you would see the 'Cygwin' shortcut in your desktop.
10. Double click on it, and type 'ls'. Cygwin has been installed successfully.

  You will notice the Cygwin terminal is not as user friendly as putty. It does not have the easy copy paste options as Putty. No worries. Puttycyg, is a putty terminal which is especially for Cygwin access.

1. Download the PutyCyg. You will get a folder with 4 files in it.
2. Double click on the Putty.
3. Choose the connection type as 'Cygterm'
4. In the Hostname, put '-'. Same in the port as well.
5. Save this with some name say 'myCyg'.
6. Double click on 'myCyg'. You are inside the Cygputty.

No comments:

Post a Comment