Home » Home » How To Execute .sh Files In Windows?

Linux user who are intimate to command-line interface interested in inheriting Windows could find lot difficulties in using the commands, because the Windows would ditch you with its own way of  command execution style, which Linux users might not be familiar, in this case you need Cygwin.

Cygwin is a Command Line steroid for Linux users, it works with all most all the basic Linux commands by default in Windows. To install Cygwin download the latest setup-x86.exe from here. The important thing to notice at the time of installation is that there are tons of optional packages to install or not to install. Cygwin allows to add packages after the installation aslo.

Launch setup-x86.exe to start the installation, and select “Install from Internet.” then Hit Next. Here you need to choose your installation directory and other settings. Next choose a temporary directory where Cygwin will store the packages it downloads. You could delete the temporary directory after the installation. Choose to download via a “Direct Connection,” then you’ll be presented with a list of Cygwin mirrors.


Now you’re there to Select Packages on screen, which is the most confusing part of the installation. Because what you’re looking on the screen is a list of Unix programs all grouped together under certain categories. If you expand the category by clicking on the plus sign, for instance, you’ll get a list that contains such mystery meat items as “bash”, “awk”, “gawk”, “grep,” “man” and more. Then rest of other installation part are familiar by clicking few buttons. When things all are done you’ll get a option to create the Cygwin icon on the Desktop or on the Start Menu.

How To Add Cygwin Path To Windows Environment Variable?

Here we go!!  The Command Line shell like Unix appears by double clicking on Cgywin icon in desktop, now it enables you to do all sort of text manipulation, networking and other funs.

This terminal launches in the C:Cygwin folder but that isn’t particularly useful because you probably don’t have any files stored there. You can use all of the basic Linux commands but if you want to get back to your C: drive you have to change directory to /cygdrive/c.

To make Cygwin work in your Windows command prompt you need to add Cygwin to your Windows Environment Variables. Start by opening your system properties with either Win+Pause/Break or right click on computer and select properties. In left column click on “Advance System Settings”, then from the system properties window locate “Environment Variables” button.


Then in the system variables, locate the path variable and click edit. At the end of the variable value option, add the Cygwin bin location


Then Click OK to close out of the window and then open a command prompt to test out a new rocking Linux commands.

Cgywin_terminal2You can execute .sh files and work around with lot of Linux commands close to your heart like grep, awk, sed  in Windows content using this, if you are finding this article boring you to tear leave your comment.

Leave a Reply

Your email address will not be published. Required fields are marked *