Home > Wiki Tips

Windows Command Prompt: What Is It & How to Use It?

Published/Updated on Monday, July 8, 2024

M3 Software author Wilsey Young

Written by

Wilsey Young


Summary: This post gives an overview of the Windows Command Prompt and tells you how to open a Command Prompt in Windows. Some common and helpful commands are set as examples in this post.

Windows Command Prompt

The Windows operating system incorporates a diverse range of built-in tools and programs designed to enhance convenience and optimize the user experience. The Windows Command Prompt, commonly referred to as cmd or CMD, plays a crucial role in facilitating users' ability and rights to modify, manage, and control their personal computers.

Keep reading this post, you will learn what the Windows Command Prompt is and how to open a Command Prompt in Windows. In addition, some commonly used and useful commands are also mentioned in this post, which contribute to starting your journey into using Command Prompt in Windows.

What is Windows Command Prompt?

Windows Command Prompt, often simply abbreviated as CMD or cmd, is a command-line interpreter application available in most Windows operating systems. It provides a text-based user interface that allows users to interact with the operating system or execute actions by running commands. This powerful tool is essential for performing various administrative tasks, automating processes, and troubleshooting system issues.

You can share this post and tell your friends about Windows Command Prompt


Getting started with the Windows Command Prompt

Using the Command Prompt is straightforward. Follow these steps to get started:

How to open a Command Prompt in Windows

You can use the Run dialog box and Windows search bar in Windows to access Command Prompt.

To access the command prompt with the Run dialog box, you can:

  1. Press the “Windows+R” keys to open the “Run dialog box.”
  2. Type “cmd” and click “OK” or press the “Enter” key on your keyboard.
    access cmd via Run dialog box 

Alternatively, you can:

  1. Press the “Windows+S” keys to launch the Windows search bar.
  2. Type “Command Prompt” or “cmd” in the search bar and you will see the option to open the Command Prompt.

Run as administrator

Some commands require administrative privileges to execute properly, so you should run as an administrator.

  1. Type “cmd” in the Windows search bar. 
  2. Select "Run as administrator" to open the command prompt. 
    cmd run as administrator

Executing commands in Windows Command Prompt

Running a command could be straightforward once you access the Command Prompt window.

  1. Type a command in the Command Prompt window.
  2. Press the “Enter” key on your keyboard to execute the command.
  3. The output will be displayed in the Command Prompt window.

Commonly used commands of Windows Command Prompt

The Windows Command Prompt has various features and uses that make it a valuable tool for everyday users and IT professionals. Here are some basic and commonly used commands.

  • sfc /scannow: The sfc in this command refers to the System File Checker, and running this command can help scan and repair system files.
    System File Checker in cmd 
  • ipconfig: This command displays the network configuration of the system.
  • netstat: Executing this command can show active network connections and ports.
  • chkdsk: chkdsk is short for check disk, so this command can check the file system and disk for errors. For example, chkdsk /r rewrites the file system directory so it matches what's actually on the hard drive, and it attempts to repair sectors on your hard drive so that they're readable within the file system.
    run CHKDSK in cmd 
  • tasklist: As the name implies, this command lists all running processes.
  • powercfg /batteryreport: This command checks the battery's health and tells you how long your battery can last based on your current usage. After running this command, a battery report with detailed information will be generated, and it should now be saved on your PC as an HTML file. You can double-click the file to open it up in your browser.
    get battery report via cmd 
  • shutdown -s -t 1200: Running this command to shut down your PC after 20 minutes(1200 means the number of seconds). You can change the number of seconds in this command when you input the shutdown command.
    run shutdown timer in cmd 


There is still a sea of commands waiting for your discovery. The Windows Command Prompt is a powerful tool that can significantly enhance your ability to manage and troubleshoot your PC and Windows system. By learning and using its commands, you can perform a wide range of tasks more efficiently and effectively. Whether you are a daily user or an IT professional, understanding the basics of Command Prompt is a valuable skill.

You can click the buttons below to share this article!