Geeks With Blogs
Enginerding Alex Moore

If you're like me and feel comfortable/more productive using a command-line, you've probably already installed Windows PowerShell.  If you're UBER (again, like me) you've probably installed Cygwin to get that delicious Bash shell and all it's *nix friends. 

The only problem with Cygwin is that it runs in the dusty old Windows Command shell, which was designed originally for, oh-let's-see, 8-bit color and 640x480 displays.  However, we can easily run Cygwin in PowerShell so that we can take advantage of the larger area/nicer color.

To do this, we simply have to change the path value of our Start Menu's cygwin.lnk item to the following:
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe C:\cygwin\Cygwin.bat

Yes, you could change Command Shell's default color/size/etc to match PowerShell's, but why?
Be lazy, be happy.

Yet another stupid developer trick to help us stay a little more sane / productive.

Posted on Thursday, March 18, 2010 12:46 PM Stupid Developer Tricks , Happyness , Productivity | Back to top

Comments on this post: Using Cygwin with Powershell

# re: Using Cygwin with Powershell
Requesting Gravatar...
Or just install Cygwin-X and run it in it's own shell.
Left by M. Weggen on Jul 16, 2010 7:53 AM

# Use mintty instead!
Requesting Gravatar...
Yeah! I know ... this post is aaaancient.
But if others (like me) come stumbling across your post they might consider NOT using PowerShell --

just install the Cygwin package "mintty" -- imho it's a far superior solution to cmd/Powershell if you want that UN*X-like feeling on your MS Windows box.

Left by Benjamin P. Jung on Oct 27, 2011 3:58 AM

# re: Using Cygwin with Powershell
Requesting Gravatar...
This didn't work for me. I copied your shortcut into the "Target" field, but it still launches cygwin in the old Windows cmd window.
Left by Sean on Apr 10, 2012 12:42 PM

# re: Using Cygwin with Powershell
Requesting Gravatar...
Yeah, this may or may not work anymore depending on your OS. I'll have to update it after I get some free time to check.
Left by Alex Moore on Apr 10, 2012 12:47 PM

# re: Using Cygwin with Powershell
Requesting Gravatar...

you can also add the cygwin to the windows environment path, so it loads with powershell and with the command prompt by default.

1. Left Click on start menu (the Orb), Control Panel and then System;
Choose Advanced System settings, Advanced Tab, and click "Environment Variables ..."

2. There in System variables, search for variable "Path", select it and then click "Edit..."

3. Add new text: C:\cygwin\bin; to the start of Variable value. Remember the ";". And then click "OK" to save everything.
Left by FINmikko on Sep 23, 2012 1:30 PM

Your comment:
 (will show your gravatar)

Copyright © Alex Moore | Powered by: