Network Administration: Editing Windows Commands

Most of the time, you just type commands by using the keyboard. If you make a mistake, you just retype the command, being careful not to repeat the mistake. However, cmd.exe has several built-in editing features that can simplify the task of correcting a mistaken command or entering a sequence of similar commands:

  • Press the right-arrow key to recall the text of the last command that you entered, one letter at a time. When you get to the spot where the new command should differ from the previous command, start typing.

  • Press F3 to recall all of the previous commands, from the current cursor position to the end of the line.

  • If you want to repeat a command that you’ve used recently, press the up-arrow key. This recalls up to 50 of the most recently executed commands. You can press Enter to execute a command as is, or you can edit the command before you execute it.