Saturday, September 24, 2011

How to Pin Cygwin Bash Shell to Taskbar and Start Menu in Windows 7

Cygwin is a collection of tools which provide a Linux look and feel environment for Window mainly via the Bash shell. I love it because it gives me the ability to use my Bash skills in Windows. Details of the project can be found at

After you install the project on Windows 7, you'd typically want to pin the "Cygwin Bash Shell" launcher (link) either to the Taskbar or Start Menu (or both). However, when you right-click the icon to do so, you'll notice none of the said options are available.

At the very least, you'd expect that the launcher would make it into the "frequently used programs" list of the Start Menu, assuming you use it frequently like I do. But you'll be disappointed here too as that never happens regardless of how frequently you use the program.

The issue is the specified target for the launcher. If you right-click the Cygwin Bash Shell launcher, and select Properties, here's what you get.

As highlighted in the image above, because the target is a batch (.bat) file, Windows doesn't give you options to pin it to the Taskbar and Start Menu in addition to not listing it as a frequently used program.

Luckily, the solution is simple. All you need to do is enter the following in Target: and click OK.

%comspec% /K "C:\cygwin\Cygwin.bat"

Of course, I am assuming that you've installed Cygwin to the default location, i.e., C:\cygwin. If you've installed it to a different location, you'll need to update the path accordingly. After you're done, properties of the launcher should look like the following:

Now if you right click the launcher again, you'll see that you can pin it to the Taskbar and Start Menu.

Not only that, Windows will now list the program as a frequently used one, if you use it frequently, giving you direct access to its launcher for quick access.

Hope that helps.


No comments: