Networking / Beginners

Using a Command Window

The concept of the command prompt hasn't changed much since those days. The system displays a prompt to let you know it's waiting for a command. When you type the command and press the Enter key, the system reads your command, interprets it, executes it, displays the results, and then displays the prompt again so that you can enter another command.

Opening and closing a command window

To get to a command prompt on a Windows server, follow these steps:

  1. Choose Start → Run.
    The Run dialog box appears.
  2. Type cmd.
    The name of the command processor for Windows NT and Windows Server is cmd.exe.
    If you type Command instead, you get Command.com, the old MS-DOS command processor, which is considerably less powerful than cmd.exe.
  3. Click OK.
    The command prompt window appears.

You can now type any commands that you want in the window.

Tip: To exit the command prompt, type Exit and press Enter. This properly terminates cmd.exe and closes the command prompt window. If you try to close the command prompt window by clicking its Close button, Windows is forced to shut down cmd.exe. The process will work, but you'll have to click your way through an intervening dialog box and wait a few seconds while Windows terminates cmd.exe. Entering the Exit command is a much faster method.

Editing 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.

Using the Control menu

Although the command window has no menu bar, it does have a menu that you can access via the control box at the top-left corner of the window. Besides the commands found on this menu for all windows (such as Move, Size, and Minimize), this menu includes three additional commands:

  • Edit: The Edit command leads to a submenu with several choices. Several of these commands work together so that you can copy information from the command window to the Clipboard and vice versa. If you choose Edit → Mark, you're placed in a special editing mode that lets you highlight text in the command window with the mouse. (Normally, the mouse doesn't do anything in the command window.) You can then choose Edit → Copy or just press Enter to copy the text that you selected to the Clipboard.
    You can also use the Edit menu to paste text from the Clipboard, to scroll the window, and to search the window for text.
  • Default: Lets you set default properties for the command window.
  • Properties: Displays a Properties dialog box that you can use to change the appearance of the window. You can change the font size, choose background colors, and make other adjustments to make the command window look good on your computer.
[Contents] [Next]