How to open Command Prompt

Overview

Command Prompt, also called cmd.exe, is Windows' classic text-based shell for running commands and batch files.

A normal window is best for everyday learning. Open an administrator window only when a trusted command specifically requires elevated rights.

  • Search Start for Command Prompt, or press Win and type cmd.
  • In File Explorer, click the address bar, type cmd, and press Enter to start in that folder.
  • The prompt shows the current folder followed by >.

Commands to try

Type each command at the prompt, then press Enter. Replace sample names and paths with ones that exist on your computer.

Commands are generally not case-sensitive, but preserving the spelling shown here makes scripts easier to read.

cmd
start cmd
explorer .

Useful options and details

Options change how a command behaves. Add spaces exactly as shown, and use the command's built-in help when an option is unfamiliar.

A path containing spaces must be enclosed in double quotes, such as "C:\My Files".

  • start cmd opens another Command Prompt window.
  • explorer . opens the current command-line folder in File Explorer.
  • The window title says Administrator when the shell is elevated.

Tips and common mistakes

Check the current folder and read the command output before assuming an operation succeeded.

Practice with disposable files first. Commands that delete, overwrite, or stop a process may not offer an Undo button.

  • Do not select Run as administrator merely for convenience; elevated mistakes can affect the whole computer.
  • Windows Terminal may host a Command Prompt tab, but PowerShell uses different syntax for some commands.
  • If a command says access is denied, first confirm that the command and target are correct before elevating.

Safe practice

Create a temporary practice folder under your user profile so the examples cannot affect Windows system files.

After each command, inspect the result with dir or another read-only command before continuing.

  • Open a normal Command Prompt from Start.
  • Read the folder shown in the prompt.
  • Run explorer ., then close both windows.