14

PuTTY is much better than cmd.exe. Can I use PuTTY to execute Windows commands?

3
  • 2
    If you want an alternative command line interpreter, look at TCCLE jpsoft.com/tccle_cmd_replacement.html - If you want something better than the gui that cmd.exe offers, look at Console 2 sourceforge.net/projects/console - I have used this combonation for a long time.
    – MaQleod
    Commented Apr 13, 2011 at 14:07
  • 1
    FYI: PuTTY is only a terminal. It doesn't execute commands, only forwards them to a (remotely running) shell. cmd.exe is a shell. It doesn't have a GUI and doesn't handle copy-pasting; that's the job of a terminal (usually the Win32 Console). If you use PuTTYcyg in place of Win32 Console windows, you'll get your copy/paste behavior, but you would still be running commands in cmd.exe. Commented Apr 14, 2011 at 5:15
  • @grawit I downloaded PuTTYcyg, but it was using the cygwin interpreter. I executed the cmd.exe interpreter inside it but it lost its auto-completion feature.
    – Jader Dias
    Commented Apr 14, 2011 at 12:29

3 Answers 3

7

The only way you could achieve this is to install an SSH or Telnet server into Windows. Windows comes with a Telnet server in the Add/Remove Windows Components.

Then you can use PuTTY to connect to the local computer and log in.

However, you will still be running cmd.exe within PuTTY, so you won't really gain anything by this - in fact it will probably be worse.

If you want the full Bash experience you should look at installing Cygwin to give you a more Linux-like interface.

3
  • 2
    What I don't like in cmd.exe is how to copy and paste there. Putty would make it easier.
    – Jader Dias
    Commented Apr 13, 2011 at 12:36
  • 2
    @Jader: Use CMD within Console2 then. You can define any keyboard shortcuts for Copy and Paste. I use CTRL+C and CTRL+V. sourceforge.net/projects/console I hide the toolbar.
    – paradroid
    Commented Apr 13, 2011 at 13:28
  • 3
    I use cygwin with puttycyg: code.google.com/p/puttycyg Commented Apr 13, 2011 at 14:09
3

Also, you can use netcat:

nc -L -p 1234 -e cmd.exe

And then connect to localhost on port 1234 using PuTTY (RAW type connection). It is still not the best, but at least you don't have to install SSH or Telnet servers. (Also, Unix-like color codes seem to work for example:

grep --color=always ...

Using Windows grep seems to work properly.

2

Alternatively to Cygwin, you can get more minimalistic bash environment with MSys-Base.

  • get mingw-get
  • install msys-base using mingw-get install msys-base

For terminal use MinTTY which is very similar to PuTTY.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .