Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google Log In with Steam Sign In
  • Create Account
Photo

How to get the most from the Windows 10 command prompt


  • Please log in to reply
No replies to this topic

#1
OFFLINE   sincity

sincity

    Advanced Member

  • Members
  • PipPipPipPip
  • 2166 posts
63
Getting Better
How to get the most from the Windows 10 command prompt

Introduction and copying text

If you tried out the previews of Windows 10, you may have seen the experimental options in the command prompt. Now that it's released, the Experimental tab in the Properties dialog is gone, but the key features are still there – just slotted into the other tabs.

To see what's available, right-click on the title bar of a command prompt window and choose Properties if you want to only change the current command window, or Defaults if you want to change every command window you open.

Master the command line

Easy selection and copying

The big new features are on the Options tab. 'Quick Edit Mode' isn't new, but it is now enabled by default. If you're looking for information about your system, like using IPCONFIG to find out your IP address, the output of this command shows you more information than you need, laid out in blocks on-screen. Quick Edit Mode makes it much easier to copy text from the command prompt because it selects the characters you drag your mouse over, rather than an arbitrary block of text on the screen.

It's now a much easier process to select and copy text from the command prompt

Make sure 'Enable Ctrl-key shortcuts' is turned on and you can finally use Ctrl-C, Ctrl-X and Ctrl-V to copy, cut and paste text you've selected in the command prompt instead of having to right-click on the window title and hunt through the Mark menu for the commands. That means you can copy a folder path from File Explorer and use it in a command, just by copying and pasting it.

If you're pasting in a command you've found online or someone has emailed to you, make sure 'Filter clipboard contents on paste' is enabled andpaste will now automatically clean up special characters like tabs and smart quotes so the command actually works (in the past you had to do that by hand, which meant checking everything in Notepad or using a utility like ClipMate).

Selecting 'Filter clipboard contents on paste' will mean special characters are automatically tidied up when pasting

If you're used to using Ctrl-C as the BREAK command – to cancel a command that's still running – just press Ctrl-C twice instead of once.

You've been able to search inside the command prompt for a while, but again the command was hidden in the menu; now you can just type Ctrl-F. Ctrl-A selects all the text in the command prompt to make it easier to copy. Make sure 'Enable line wrapping selection'is selected to have Windows clean up the text you copy.

Them's the breaks

The command prompt still treats what you select as a block of text that might be broken up over multiple lines instead of a single string of text, and again you used to have to use Notepad or ClipMate to get rid of the extra line breaks – with line wrapping enabled, you get the text without the line breaks. If you need them occasionally, just hold down the Alt key as you start to select the text and you'll get the block mode for just that selection.

If you mostly use the mouse, you won't need to turn on 'Extended text selection keys' – this lets you use the Shift and arrow or Page Up and Page Down keys to select text a character, line or page at a time, in the direction of the arrow. Use Ctrl-Shift to select a whole word at a time with the arrow keys, or select to the top or bottom of the screen with the Home and End keys.

You can also use Shift+Home and Shift+End to select from where the cursor is to the left or right side of the screen; if you're in the middle of typing a command, use them to select either what you're typing, or the whole line.

Resizing and readable fonts

Resizing tricks

You can now resize the command prompt window just by dragging the corners of the window to the size that you want. Make sure that 'Wrap text output on resize' is selected on the Layout tab and the text in the command prompt will resize with the window, rather than making you use the horizontal scrollbar to see the end of the line if you made the window smaller.

You don't need to change the buffer size (which is where the command prompt stores commands you've already typed, so you can reuse them just by pressing the up arrow key to pick an earlier command) to match the new window size by hand anymore – Windows automatically increases and decreases it to match the window as you drag it, so everything reflows correctly.

If 'Wrap text output on resize' is enabled, the text in the command prompt resizes with the window

Readable fonts

On very high resolution screens (including the Surface Pro), the command prompt has been all but unreadable because the text size was so small – make sure you choose one of the TrueType fonts on the Font tab instead of Raster Fonts and it will automatically scale so you can actually read it easily. The default Terminal font is a raster font, so make sure you change it to one of the TrueType fonts instead.

You've been able to change the colours of your command window on the Colours tab for a long time (handy if you have two windows open for running different sets of commands). Now there's also an opacity slider that lets you make the window semi-transparent so you can see the windows behind it.

You can now make the command window semi-transparent with the opacity slider

If you're running a command that makes a change to another window or application, like saving a list of all the files in a folder to a text file with the command DIR /B>FILE.TXT, you can see through the command window to the Explorer window to make sure the file appears correctly. You can't drag the slider to less than 30% opaque; the Windows team found it was too easy to lose the command prompt entirely if you made it more transparent than that.















0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users