Tyler Muth’s Blog

Technology with a focus on Oracle, Application Express and Linux

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…

About these ads

6 Responses to “The Best Unix-like Windows Command Prompt”

  1. Noons said

    NEAT! Thanks!
    I’ve been a Cygwin user for eons and always wondered why putty couldn’t do this.

  2. Jon said

    I used to use PuttyCyg all the time until I found MinTTY (http://en.wikipedia.org/wiki/MinTTY). It’s based on putty and you can find it in the cygwin package repos. It also has nice transparency effects.

  3. [...] The Best unix-like Windows Command Prompt « Tyler Muth’s Blog 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: … [...]

  4. John Scott said

    Tyler,

    We will convert you to a Mac eventually ;)

    John.

  5. Rahul said

    Hi,

    Nice posting. Thanks a lot for sharing.

  6. I have been surfing on-line more than 3 hours today, but I by no means found any fascinating
    article like yours. It’s pretty price enough for me. In my view, if all webmasters and bloggers made excellent content as you probably did, the net can be much more useful than ever before.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

Join 87 other followers

%d bloggers like this: