Xah Lee, 2009-07-11, 2011-03-31
This page gives you some tips about using Windows Console. When you run “cmd.exe” or PowerShell, they run in the Windows Console.
Windows Console.
How to copy & paste in Windows console?
For using mouse, you need to enable it first.
Right click on the window, then select “Properties”, click the “Options” tab. Check the “QuickEdit Mode”, press OK. Once that is done, you have copy & paste by mouse enabled.
Is there a way to page up/down in Windows console?
No. But mouse scroll wheel works. Or, you can click the scroll bar.
Is there a keyboard shortcut to delete a whole word?
No. However, you can move by word, using 【Ctrl+←】 and 【Ctrl+→】.
Is it possible to get Windows console to display Unicode such as Chinese?
probably. See: Source msdn.microsoft.com
Is there a app bundled with Windows Vista to do ssh?
Basically no. You can use PuTTY and Tera Term. Windows does not have the unix tradition of telnet/ssh to remote computers to do sys admin. (However, it does support remote computing, based on Remote Desktop Services.)
| Key Press | Function |
|---|---|
| Home | Beginning of Line |
| End | End of Line |
| Ctrl+← | Move cursor to previous word |
| Ctrl+→ | Move cursor to next word |
| Ctrl+c | Cancel current command or clear the current command line |
Here's the most useful Windows Console keyboard shortcuts:
| Key Press | Function |
|---|---|
| ↑ | Previous command |
| ↓ | Next command |
| PageUp | First Command |
| PageDown | Last Command |
| F8 | Search command history by a string |
Here's some almost useless keys:
| Key Press | Function |
|---|---|
| F2 | Type previous command up to a char |
| F3 | Display previous command |
| F4 | Delete char forward up to a char |
| F5 | Same as ↑ |
| F7 | List command history |
| F9 | Run a previous command by its numberic index |
PowerShell ISE.
If you are using PowerShell, a much better solution is to use the Windows PowerShell ISE instead. (ISE = Integrated Scripting Editor). The PowerShell ISE is bundled with PowerShell. The PowerShell ISE has split panes that lets you run commands in one pane and do script editing in another pane. And if you do not need to write scripts, you can close that pane and use it just like Windows Console. Also, PowerShell ISE can display Unicode chararacters, support color, support page up/down buttons, has keyboard shortcuts to delete by word, etc.
For cmd.exe, you can use Console 2 at Source sourceforge.net. Console 2 has some problems on 64bit Windows Vista. If you are willing to compile yourself, see this source code fix (2008-08) by Tomas Restrepo at Source winterdom.com.
Or, you can use emacs. Emacs has support for running cmd.exe or PowerShell. See:
2011-03-31 Thanks to Mouffe K rema for a tip about copy/paste keys.
blog comments powered by Disqus