Tyler Muth’s Blog

Technology with a focus on Oracle, Application Express and Linux

Posts Tagged ‘puttycyg’

The Best Unix-like Windows Command Prompt

Posted by Tyler Muth on November 30, 2009

If you follow this blog you know that my laptop is Windows 7 but I live my life in Linux Servers.  As such, I’m a big fan of the bash shell.  I’ve been running Cygwin on my laptops for as long as I can remember to get all of my favorite Linux commands on Windows.  However, the Windows Command Prompt has always felt a little clunky.  I’ve been using Console2 for a while, which I really like but when you combine it with Cygwin on Windows 7, it hangs a lot which is NOT what I want from a shell. I love the feel of Putty when ssh-ing to a Linux / Unix machine, but something about running sshd on my laptop felt like overkill.

Then I discovered PuttyCyg. Essentially it’s a one-off port of Putty that in addition to ssh, lets you connect to your local installation of Cygwin.  Make sure you read the FAQ on that page.  Note the additional option highlighted in yellow:

The main quirk I ran into was with sqlplus and rman.  Just like on Linux / Unix, it lacks the up-arrow functionality which I can’t live without.  So, make sure you also install rlwrap when installing Cygwin.  Then, in your ~/.bashrc file add the following aliases:

alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'
To summarize:
  1. Download and install Cygwin.  Make sure you include the rlwrap package.
  2. Create the 2 aliases in your ~/.bashrc file so sqlplus and RMAN use rlwrap.
  3. Download and unzip PuttyCyg.
  4. Optionally create a shortcut to PuttyCyg in your start menu with the following syntax (substituting your actual directories):
"C:\Program Files\puttycyg-20071202\putty.exe" -cygterm -

Now when you run PuttyCyg you have a Putty client connected to your local Windows machine.  Command Prompt bliss…

Posted in Uncategorized | Tagged: , , | 6 Comments »