How to download and install Cygwin on PC/Laptop for Windows XP/Vista/7/8/8.1/10 to run Linux/Unix Terminal - Cyber Programmers - Learn Programming


Thursday, June 4, 2015

How to download and install Cygwin on PC/Laptop for Windows XP/Vista/7/8/8.1/10 to run Linux/Unix Terminal

If have you read our previous posts then you know that you can install Linux operating system on your Windows computer as a virtual machine or dual boot your computer. So what you don't know actually is that you can install special software on your Windows computer and use Linux commands on it.
In this post, I will show you how to install Cygwin on your computer to run Linux/Unix terminal.

1) First of all, go to Cygwin official website.
2) Now there you need to choose which installation you need 32-bit or 64-bit. Of course, if you are using 32-bit Windows then you need to download 32-bit installation package and for 64-bit you can use both installation packages but I recommend to download the 64-bit installation package.
3) After the download is complete, run the installation file.
4) The first step on installation window is simple, just press Next button. In next step leave it by default and again press on Next button. In the third step, it will ask for the directory to install the Cygwin, do not change it, leave as default and press on Next button for next 3 steps.
5) Now you need to choose in mirror form where it will download the installation files, I recommend to choose second one and press on Next button.
6) This step is an important one. You need to choose the packages you want to download and the packages you want to skip from the list. If you leave it by default then you can execute only basic commands. So if there are some specific commands you want to use in future then check them from the list. Or if you want to install all packages then click on sync icon in "All" line to change it to "Install" status, which will install all packages. And press on Next button.
7) Now it will download the packages you selected and after it will install them.
8) When it's done you can press on Finish button.
Now you can open up Cygwin from the desktop if you want to change some settings such as font size or color then right click on opened Cygwin terminal and choose Properties and change the settings.

If you want to change the Home directory of terminal hen does next:

1) Open up Run in Windows, paste control.exe %windir%\system32\sysdm.cpl on it and click OK.
2) In opened window navigate to Advanced tab and click on "Environment Variables..." button.
3) Now there you need to press on "New..." button at the top, which stands for the user.
4) Now enter the name of a new variable which must be "HOME" and at the second box which is Variable valueadd a new Home directory you want for the terminal, it can be a folder on the desktop.
When you are done, press OK buttons to confirm the settings on all windows.
So when you open a Cygwin next time you can see that the directory changed to that folder you entered.