If you are like me who moved from Unix/Linux world to Windows, but still comfortable in working with bash shell, VI, emacs and cscope/ctags for source code browsing, cygwin is here for you.
I have been using cygwin from 2005 when we moved from Linux based development and desktop systems to Windows. It helped me in transiting slowly into GUI world from command line world. Though I am pretty comfortable with windows with respect to editing documents, power point presentations, emails and 90% of the work which I do at office and home, I am still comfortable using Cygwin for source code related activities whether it is for understanding the code, developing the code, develop some simple proof-of-concepts etc..
Cygwin has almost all development libraries, databases, editors, servers, client applications which you normally need to use as a programmer. It is quite rich. Ones which I use normally are -- VI editor, mlcscope (cscope variant), ctags, gcc, git, svn, several compression/decompress utilities including gzip, bzip and many archiving utilities such as tar etc.. As you may know many of the open source packages you downloads are available in tar.gz (tgz), tar.bz2 formats. Hence these utilities come in handy. Also, as a developer if you need to download latest source code from source code repositories, one needs to have utilities such as svn, git. By the way, git and svn repositories are more popular now than 'cvs'.
Cygwin is available in here at www.cygwin.com.
Download and install instructions are available at above site. But, I will try to give some quick instructions on downloading and installing cygwin packages.
Click on "Cygwin Terminal", you would see your familiar bash terminal.
If you want to access the files in your drives on Windows, it is simple. By default, when the bash terminal is opened, you are in directory called "/home/<windows user name>". Cygwin root directory is typically starts at the installation directory you have chosen. If you remember, by default the cygwin installation directory is c:\cygwin.
To go to any directory in "C:\" , "D:\" or any drive in the windows, you can do it by typing "/cygdrive/<drive name>/<subdirectory>. That is to go to c:\ from the cygwin terminal, you can type "/cygdrive/c" and press enter. Now, you can see all files in c:\ using familiar bash commands such as "ls". Another neat thing is that you could execute even your windows executables from the the cygwin terminal.
I have been using cygwin from 2005 when we moved from Linux based development and desktop systems to Windows. It helped me in transiting slowly into GUI world from command line world. Though I am pretty comfortable with windows with respect to editing documents, power point presentations, emails and 90% of the work which I do at office and home, I am still comfortable using Cygwin for source code related activities whether it is for understanding the code, developing the code, develop some simple proof-of-concepts etc..
Cygwin has almost all development libraries, databases, editors, servers, client applications which you normally need to use as a programmer. It is quite rich. Ones which I use normally are -- VI editor, mlcscope (cscope variant), ctags, gcc, git, svn, several compression/decompress utilities including gzip, bzip and many archiving utilities such as tar etc.. As you may know many of the open source packages you downloads are available in tar.gz (tgz), tar.bz2 formats. Hence these utilities come in handy. Also, as a developer if you need to download latest source code from source code repositories, one needs to have utilities such as svn, git. By the way, git and svn repositories are more popular now than 'cvs'.
Cygwin is available in here at www.cygwin.com.
Download and install instructions are available at above site. But, I will try to give some quick instructions on downloading and installing cygwin packages.
- Look for "setup.exe" link the cygwin home page. You can also find it in "Install Cygwin" link.
- Your browser would download "setup" executable and would take permission to run. Many browsers in recent past have added this addition step to stop unsolicited executables to execute and install without user knowledge. Since, in this case, we are deliberately downloaded this and executing it, you can give permissions to run. If you are running as a Windows user (not as an administrator), it would ask you to enter the administrator password to install cygwin packages for all users in the system. Go ahead and enter your administrator password.
- "Setup" program is a GUI based program with each screen having "Next" button. It is pretty much self-explanatory.
- First screen explains that the purpose of this program, copyright etc.. Clicking on "Next" to move forward.
- Program asks you to download the actual cygwin packages and install from "Install from Internet", "Download without Install", "Install from local directory". If this is the first time you are running this application, you may like to select "Install from Internet" and click on "Next".
- "Choose Install Directory" screen ask for the installation directory. You can leave the default option, if you don't want to remember this during future upgrades. It also asks for you to make cygwin available for all users in the windows machine or only for current user. Since it is useful for all users, I normally select "All users". Click on "Next" to proceed further.
- "Select Local Package Directory" screen asks for cygwin setup/upgrade program to store some information such as installation files. Using this, cygwin setup program knows the cygwin programs it had installed in the system in previous attempts. I, normally keep the default directory as is. Click on "Next" to proceed further.
- "Select Your Internet Connection" lets you choose the way to download files. If you have no proxies to Internet, which would be the case for many home users, then select "Direct Connection". If your machine is behind a proxy, then it gives you two options - You could ask the setup program to learn it from your IE or you could give the proxy details yourself. Once this is done, click on "Next" to go to next screen.
- "Choose download sites"; Cygwin packages are available from multiple sites. This screen provides all the mirror sites where cygwin packages can be downloaded by "setup" program. It is difficult to know which site is near you, but yet times the domain name might give you some clue. Select the one which you believe could be near you. Once the site is selected, click on "Next".
- "Select Packages": This is the screen which allows you to select the packages to download. In addition to base package, I normally select following;
- Under "Databases", I select postgres related items as yet times I work with databases.
- Under "Devel", I select "gcc4" compilers, ctgs and mlcscope.
- Under "Editors", I select VIM, emacs.
- "Select packages", you can also search if you know the package name or part of the package name.
- Note that you could come back and select some more packages at later time too. So, if you don't know all the packages you require at this time, there is nothing to worry. You can upgrade the cygwin at any time in future.
- Clicking on "Next" would download the packages and installs them. This might take few minutes to 1/2 hour based on a broadband connection. Once it completes installing them, it would ask you to keep the icon on desktop. "Finish" would finish up the setup program.
- You would see 'Cygwin Terminal" icon on desktop and also in "Start" screen.
Click on "Cygwin Terminal", you would see your familiar bash terminal.
If you want to access the files in your drives on Windows, it is simple. By default, when the bash terminal is opened, you are in directory called "/home/<windows user name>". Cygwin root directory is typically starts at the installation directory you have chosen. If you remember, by default the cygwin installation directory is c:\cygwin.
To go to any directory in "C:\" , "D:\" or any drive in the windows, you can do it by typing "/cygdrive/<drive name>/<subdirectory>. That is to go to c:\ from the cygwin terminal, you can type "/cygdrive/c" and press enter. Now, you can see all files in c:\ using familiar bash commands such as "ls". Another neat thing is that you could execute even your windows executables from the the cygwin terminal.
No comments:
Post a Comment