Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • DSA
  • Practice Problems
  • Python
  • C
  • C++
  • Java
  • Courses
  • Machine Learning
  • DevOps
  • Web Development
  • System Design
  • Aptitude
  • Projects
Open In App
Next Article:
How to Open Command Prompt in Windows 11, 10, 8, 7
Next article icon

How to Use Command Prompt - Windows Command Prompt Guide

Last Updated : 22 Apr, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

Learn how to manually run the Command Prompt in different versions of Windows - The Windows Command Prompt (CMD) is a powerful tool that allows users to execute commands, automate tasks, and troubleshoot system issues efficiently. Whether you’re a beginner looking to learn basic CMD commands or an advanced user wanting to optimize your workflow, mastering the Windows Command Line Interface (CLI) can significantly enhance your computing experience.

In this step-by-step Windows Command Prompt tutorial, we’ll cover everything from basic commands like cd, dir, and mkdir to advanced functions such as network troubleshooting, batch scripting, and system management. Learning CMD can help you navigate Windows faster, execute tasks more efficiently, and fix errors that may not be solvable via the graphical interface.

Follow this tutorial to unlock the full potential of Windows Command Prompt and take control of your system like a pro.

Windows-Command-Prompt-Tutorial
Complete Windows Command Prompt Tutorial

What is a Command Prompt?

The Command Prompt is a powerful tool for troubleshooting Windows and managing files. It provides a text-based interface where users can execute various system commands and configure their computer. The Command Prompt is for all levels of users who are looking to perform advanced Command Prompt techniques, CMD also opens a broad range of capabilities, from automating tasks to system diagnostics.

  • What is a Command Prompt?

Getting Started with Command Prompt

Learn how to open the Windows Command Prompt and understand its basic functions. This foundational knwoledge is seesntial for navigating your system using simple command-line.

  • How to Open Command Prompt in Windows 11, 10, 8, 7
  • How to Open Command Prompt as Administrator?
  • How to Open Command Prompt with Keyboard Shortcuts

Basic Command Prompt List

Master the essential CMD commands to manmage directories, list files and clear the screen. These commands are fundamental for effective system navigation.

  • cd
  • dir
  • cls

Also read 39 Windows CMD Commands for Everyone

System Information

Utilize systeminfo and ipconfig commands to retrieve detailed information about your system's configuration, including network settings and hardware specifications. This is crucial for troubleshooting and system optimization.

  • System Info
  • ipconfig
  • ping
  • tasklist

File and Directory

In this section, you'll get to know how to list all files in directories, search files using CMD, and will also allow you to create, manage and delete files and folders.

  • List all Files in a Directory
  • Search files
  • mkdir
  • Rename (files and folders)
  • del
  • Hide
  • Compress (files and folders)
  • copy
    • Xcopy
  • move

Networking and Connectivity

Diagnose and configure network settings with netstat, ping and tracert commands. These tools help you to test network connections, check network routes, and troubleshoot connectivity issues in your Windows system.

  • netstat
    • Check Open Ports
  • tracert
  • ftp
  • Telnet
  • nslookup

System Utilities

Maintain and repair system files using sfc and chkdsk commands. These built-in prompts are essential to ensure that you can make the most out of it.

  • Difference Between SFC, CHKDSK, and DISM
  • Chkdsk
  • Repair
    • sfc
  • Diskpart

Advanced Commands

In this section, you'll get to know some of the advanced CMD commands and functionality to automate your system tasks so that you can manage and perform any complex tasks with ease.

  • Powershell
  • Abort Command Execution
  • Regedit
  • Shutdown
  • CMD Commands to Gather Information of a System

Customization

Personalize your Command Prompt experience by changing its font, text, creating batch file, Wi-Fi Hotspot, and Install program. These commands will enhance and make your experience seamless.

  • Color cmd command
  • Change text colour
  • How to Clear the Windows Command Prompt Screen
  • Setting up custom batch file
  • Create a Wi-Fi Hotspot
  • Merge/Hide One File into Another
  • Copy files from one Directory to another
  • Personalize Environment
  • Hide text behind text
  • Install Program
    • Install Chocolatey
    • Install Specific Version using Chocolatey
  • Uninstall Software

Common Troubleshooting

You can use CMD troubleshooting commands like bootrec, bcdedit and sfc to diagnose and fix boot issues, repair corrupt files, and resolve system errors.

  • Scannow
  • Bootrec
  • Bcdedit
  • Remove Virus
  • Show Previously Connected Wi-Fi Devices
  • How to Repair Windows Common Errors Only With CMD

Command Prompt Tips and Shortcuts

Enhance your productivity with CMD Keyboard Shortcuts such as Ctrl + C (to stop process), Ctrl + Z (undo), or F7 to check the command history. These shortcuts enahnce users to navigate moe efficiently.

  • Keyboard shortcuts
    • Change and Customize Keyboard Shortcuts
  • Command Prompt Hacks
  • Useful CMD Commands for Daily Usage
  • 26 Useful CMD Commands for Everyone
  • Remotely Start Windows
  • How to Run an exe through CMD

Command Prompt Real-Life Use Cases

In this section, you'll get to know about how CMD commands can work as a charm in real-life scenarios. Whether you are looking to automate any task, or schedule it for later, you can do it all by just using the Windows Command Prompt.

  • Automate tasks using CMD
  • Change Windows Password
  • Manage Network configuration
  • Basic Scripting with batch files

Next Article
How to Open Command Prompt in Windows 11, 10, 8, 7
author
yuvraj10
Improve
Article Tags :
  • TechTips
  • Command Prompt

Similar Reads

  • How to Clear the Windows Command Prompt Screen
    If you've been working in the Windows Command Prompt and your screen is cluttered with text, knowing how to clear the Windows Command Prompt screen can make your workspace much tidier and easier to manage. This simple task can help you focus on the commands you're working on without distraction. In
    6 min read
  • How to Repair Windows 10 Using Command Prompt - 5 Methods
    Is your Windows 10 not working right? Maybe it’s slow, keeps crashing, or won’t start properly. These problems can be annoying, but you don’t have to do something big like reinstalling Windows yet. There’s a handy tool called Command Prompt that can fix many Windows issues, and it’s already on your
    6 min read
  • How to Shut Down a Computer using Command Prompt?
    Shutting down your computer via the Command Prompt is a useful method that can help you perform a clean shutdown without having to use the standard Windows interface. Below are the steps to guide you through the process, along with some variations for advanced shutdown options. Table of Content 1. B
    5 min read
  • How to Open Command Prompt in Windows 11, 10, 8, 7
    The Command Prompt is a powerful tool in Windows for executing commands, troubleshooting issues, and automating tasks. Whether you're using Windows 11, 10, 8, or 7, this guide covers all the methods to open Command Prompt quickly and efficiently. 8 Proven Methods to run the Command Prompt (cmd) in W
    8 min read
  • How to Format a Hard Drive Using the Command Prompt
    Formatting a hard drive is a common step when setting up a new disk or repurposing an old one. Although there are various methods to format in Windows, using the Command Prompt offers a fast and efficient option, particularly for advanced users. This article will show you how to format a hard drive
    4 min read
  • How to Open Google Chrome Using CMD on Windows 11?
    Opening Google Chrome using CMD in Windows 11 is a convenient way to launch the browser without needing to use the graphical interface. Whether you're troubleshooting or simply prefer using the command line, this guide will show you how to run Chrome via CMD on Windows 11. The steps are easy and can
    4 min read
  • How to Abort a Command Execution in Command Prompt?
    When working in the Command Prompt, there are times when you need to halt a running command immediately. Understanding how to abort command execution in CMD can save you from potential issues and wasted time. In this guide, we'll explore various methods to stop commands, including using `Ctrl+C`, te
    5 min read
  • How to Open the Command Prompt as Administrator in Windows
    The Command Prompt is a powerful tool in Windows that lets you run commands to manage files, troubleshoot problems, and control system settings. But some commands require administrator access to work properly. Opening the Command Prompt as an administrator—often called “elevated mode” gives you full
    6 min read
  • How to Change Windows Computer Password using CMD
    If you are a Windows user, one of the easiest ways to change your password is through the Command Prompt (CMD). This is especially helpful for users who prefer command-line tools or face issues accessing the standard settings menu. In this article, we’ll guide you through the steps to change your Wi
    4 min read
  • How to Use the Xcopy Command in Windows?
    The xcopy command in Windows is a powerful tool for copying files and directories. It extends the functionality of the standard copy command by allowing the copy of entire directories along with their subdirectories and files all at once. This makes xcopy highly useful for tasks such as backing up f
    5 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences