Command Prompt (cmd.exe)


The cmd.exe shell processes the legacy command set that has been part of Windows since its earliest versions.

  • can also run legacy commands in PowerShell prompt
  • Run as administrator to run commands with elevated privileges
    • the default folder is in C:\Windows\System32 rather than C:\Users\Username

Command Syntax

  • command name + switches + arguments
  • switches are preceded by forward slash /
  • cls clears the screen
  • some commands use interactive mode
    • E.g., nslookup or telnet
    • using the command starts the program
    • exit or quit or CTRL+C to exit

Getting Help

  • help shows a list of commands
  • help 'command' lists the syntax and switches of a command
    • alt: 'command' /? displays help screen