9 Reasons Why MinTTY is the Best Terminal on Windows

by Chad Austin on October 20th, 2009

MinTTY is a fantastic piece of software that smoothes some of the edges of the Windows command line experience. You should use it and here’s why:

  1. MinTTY comes with Cygwin

Installing MinTTY is trivial: just select the mintty package in Cygwin’s setup.exe and point your Cygwin shortcut to C:\cygwin\bin\mintty.exe -. The trailing hyphen is important.

MinTTY Setup
  1. Sane copy and paste

By default, MinTTY copies on select and pastes on right-click, just like Linux. However, you can make it behave like a typical Windows application and show a context menu upon right-click.

MinTTY Context Menu

I won’t bother explaining how difficult copying and pasting is in standard Windows consoles.

  1. Resizing

MinTTY supports arbitrary window sizes, including maximized. Enough said.

  1. Works with less/emacs/ssh

Because MinTTY is based on PuTTY, it doesn’t display output strangely when running emacs over ssh, among other examples.

  1. It’s FAST

Anyone who has done command line work on Windows has surely noticed that, when a program spews output to the console, system performance nosedives. Sometimes, even the mouse cursor skips, making it hard to kill the program responsible.

MinTTY doesn’t have this problem — it uses minimal CPU, even under heavy load.

  1. Doesn’t bypass RSI Guard

Five years ago, I was diagnosed with repetitive stress injuries from programming. To make matters worse, I get obsessive when I work, and nothing can pull me away from the keyboard.

RSI Guard keeps my wrists and elbows pain-free by enforcing short, periodic breaks. However… years of exposure to RSI Guard has caused me to discover its holes. For example, native console windows bypass RSI Guard’s protection, so when RSI Guard blocked keyboard and mouse input, I would quickly switch to typing in a console window and continue to work. Because MinTTY is a standard Windows application, it closes this backdoor.

  1. Closes even when programs are backgrounded

Open a fresh Cygwin and type notepad & followed by exit. The Cygwin console sticks open until you close Notepad.

In MinTTY, you can always close the window, no matter how many background processes you’ve started.

  1. Alt-F2 opens a new terminal window

Pure convenience: Alt-F2 opens a new terminal. No need to reach for the mouse.

  1. Shift-PageUp and Shift-PageDown!

For rapidly paging through previous lines of output, you can press Shift-PageUp and Shift-PageDown, just like the Linux console. Another huge convenience.

10 Responses to “9 Reasons Why MinTTY is the Best Terminal on Windows”

  1. Ben McGraw Says:

    Sadly, the python interactive prompt doesn’t play nice “out of the box” with mintty.

    Otherwise, I love it!

  2. Andy Koppe Says:

    The Cygwin version of Python should be fine. The Windows version goes into non-interactive mode because it expects to talk to a Windows console rather than a Cygwin terminal. The -i option will tell it to enter interactive mode anyway.

  3. Ben McGraw Says:

    Andy Koppe, you’re now my double-hero!

  4. Terry Dooher Says:

    Good lord! I was looking for a way to make cmd.exe less sucky when sshing into my various servers and came across this. I’ve always found PuTTY a bit cumbersome, but had no idea MinTTY existed until now. It’s fast, renders UTF8 and doesn’t leave my curosr in really stupid positions if I scroll up the history. Bliss!

    Cheers,

    Terry.

  5. Martin Says:

    Thanks for the info about the -i switch. Saved me from a lot of searching perhaps :)

  6. Bill Sagert Says:

    1. “MinTTY comes with Cygwin” Score: +1 for you

    2. “Sane copy and paste” The dos console on my xp box has exactly the same copy and paste behavior as Linux.

    3. “Resizing” My dos console also maximizes to full screen, minimizes to the tray and/or reverts to its former arbitrary size.

    4. “Works with less/emacs/ssh” Score +2/3 for you. I ssh on my dos console using python/paramiko/pycrypto.

    5. “It’s FAST” Can you prove it?

    6. “Doesn’t bypass RSI Guard” Score +1 for you

    7. “Closes even when programs are backgrounded” Why is this important? The command “notepad & exit” on dos works, only the sequence differs.

    8. “Alt-F2 opens a new terminal window [without a mouse]” I use hotkeys to do the same.

    9. “Shift-PageUp and Shift-PageDown!” Huh? Is that different from just pgup or pgdn?

    10. Good article. I agree that minTTY has its charms. Ciao, Bill

  7. Yohann Says:

    mintty doesn’t directly support changing ansi color mappings. but i found out how to get the cool desert color scheme in mintty!! Just copy/paste these escape sequences or add it to your .bashrc.

    echo -e “\e]4;15;#ffffff\a”
    echo -e “\e]4;14;#ffd700\a”
    echo -e “\e]4;13;#ff55ff\a”
    echo -e “\e]4;12;#87ceeb\a”
    echo -e “\e]4;11;#ffff55\a”
    echo -e “\e]4;10;#55ff55\a”
    echo -e “\e]4;9;#ff5555\a”
    echo -e “\e]4;8;#555555\a”
    echo -e “\e]4;7;#f5deb3\a”
    echo -e “\e]4;6;#ffa0a0\a”
    echo -e “\e]4;5;#ffdead\a”
    echo -e “\e]4;4;#cd853f\a”
    echo -e “\e]4;3;#f0e68c\a”
    echo -e “\e]4;2;#98fb98\a”
    echo -e “\e]4;1;#ff2b2b\a”
    echo -e “\e]4;0;#4d4d4d\a”

    Set the foreground, background and cursor color from the UI. I suggest
    foreground = 255,255,255
    background = 51,51,51
    cursor = 0,255,0

    Enjoy

  8. Craig Says:

    I’ve been using MinTTY for a while now, but wasn’t aware of some of these features. Thanks for the article.

    Another handy thing is adding a menu entry to the shell, so you can select “Mintty here” in Windows Explorer and open a Mintty terminal at that current directory.

    For this example, first install the “chere” package in Cygwin setup, then add the following registry entries:

    Windows Registry Editor Version 5.00

    [HKEY_CLASSES_ROOT\Directory\shell\mintty]
    @=”Mintty Here”

    [HKEY_CLASSES_ROOT\Directory\shell\mintty\command]
    @=”c:\\cygwin\\bin\\mintty.exe -e /bin/xhere /bin/bash.exe \”%L\”"

    [HKEY_CLASSES_ROOT\Drive\shell\mintty]
    @=”Mintty Here”

    [HKEY_CLASSES_ROOT\Drive\shell\mintty\command]
    @=”c:\\cygwin\\bin\\mintty.exe -e /bin/xhere /bin/bash.exe \”%L\”"

    Copy those into a file “cygwin-mintty-here.reg” then right-click and select “Merge.” Done!

    To remove the menu entry, add the following to a file, (e.g., “cygwin-mintty-here_remove.reg”) and Merge:

    Windows Registry Editor Version 5.00

    [-HKEY_CLASSES_ROOT\Directory\shell\mintty]

    [-HKEY_CLASSES_ROOT\Drive\shell\mintty]

    Thanks for the tips!

    Craig

    –EOM

  9. Carlos Ferreyra Says:

    Excellent!

    I was looking for cool terminal for windows.
    It’s very lightweight, contrary to Console.

  10. Michal Says:

    My god… It takes me so many years and wasted time to learn about python -i. You are real hero!

Leave a Reply