Array
University of Oregon

Command Prompt (Windows)

dosWhat It Is

The Windows Command Prompt is an interactive command interpreter: it reads commands from the command line, finds the corresponding programs, runs them, and displays the output.

Command Prompt is analogous to the Unix shells used on Unix-like systems (OS X).

Other names for the Command Prompt are Command Line Interface (CLI), Read-Eval-Print-Loop (REPL), Console window, and Shell. Therefore, we have five terms that are equivalent: Command PromptShell, CLI, REPL, Console.

Starting the Command Prompt

The way to start the command prompt is dependent on your version of Windows: You either run cmd.exe or command.com.

  • cmd.exe or cmd (after its executable file name), is the command-line interpreter for Windows 8 or higher, Windows NT, Windows CE, OS/2.
  • command.com is the executable file name in DOS and Windows 9x systems (where it is also called “MS-DOS Prompt”)

==> To launch Command Prompt 

Legacy versions of Windows:
Start -> Run
and type cmd in the box.

On Windows 8 or higher:

  1. Swipe in from the right edge of the screen, and then tap Search.
    (If you’re using a mouse, point to the upper-right corner of the screen, move the mouse pointer down, and then click Search.)

  2. Enter cmd in the search box, and then tap or click Command Prompt.

This will open a window (the console) that by default displays the current directory (folder) that you are in,  and has a blinking cursor ready for you to type your commands.

At the prompt, type in a command, and then press enter.

C:\WINDOWS> is the command prompt, and it tells you that your are currently in the c:\windows directory.

If you were in the directory c:\program files\directory the prompt would instead look like this: C:\PROGRAM FILES\DIRECTORY>.

Learning the Command Prompt

Online tutorials:

 

Skip to toolbar