9 Reasons Why MinTTY is the Best Terminal on Windows
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:
- 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.
- 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.
I won't bother explaining how difficult copying and pasting is in standard Windows consoles.
- Resizing
MinTTY supports arbitrary window sizes, including maximized. Enough said.
- 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.
- 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.
- 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.
- 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.
- Alt-F2 opens a new terminal window
Pure convenience: Alt-F2 opens a new terminal. No need to reach for the mouse.
- 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.
Sadly, the python interactive prompt doesn't play nice "out of the box" with mintty.
Otherwise, I love it!
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.
Andy Koppe, you're now my double-hero!
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.
Thanks for the info about the -i switch. Saved me from a lot of searching perhaps :)
"MinTTY comes with Cygwin" Score: +1 for you
"Sane copy and paste" The dos console on my xp box has exactly the same copy and paste behavior as Linux.
"Resizing" My dos console also maximizes to full screen, minimizes to the tray and/or reverts to its former arbitrary size.
"Works with less/emacs/ssh" Score +2/3 for you. I ssh on my dos console using python/paramiko/pycrypto.
"It's FAST" Can you prove it?
"Doesn't bypass RSI Guard" Score +1 for you
"Closes even when programs are backgrounded" Why is this important? The command "notepad & exit" on dos works, only the sequence differs.
"Alt-F2 opens a new terminal window [without a mouse]" I use hotkeys to do the same.
"Shift-PageUp and Shift-PageDown!" Huh? Is that different from just pgup or pgdn?
Good article. I agree that minTTY has its charms. Ciao, Bill
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
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
[HKEYCLASSESROOT\Directory\shell\mintty] @="Mintty Here"
[HKEYCLASSESROOT\Directory\shell\mintty\command] @="c:\cygwin\bin\mintty.exe -e /bin/xhere /bin/bash.exe \"%L\""
[HKEYCLASSESROOT\Drive\shell\mintty] @="Mintty Here"
[HKEYCLASSESROOT\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
[-HKEYCLASSESROOT\Directory\shell\mintty]
[-HKEYCLASSESROOT\Drive\shell\mintty]
Thanks for the tips!
Craig
--EOM
Excellent!
I was looking for cool terminal for windows. It's very lightweight, contrary to Console.
My god... It takes me so many years and wasted time to learn about python -i. You are real hero!
Only major problem is that Windows command-line tools like the Vim bundled with Git Bash fail to work: https://code.google.com/p/mintty/issues/detail?id=56
Along with the Alt+F2 feature, you can use CTRL+TAB to cycle through the MinTTY windows you have open. So for folks who are used to using tabbed interfaces, this is a nice way to open multiple windows and move between them.
And no tab completion on, at least not on v2.0.3 :(