CMD Tutorials

Welcome

Namaste and Welcome to the Command Prompt (CMD) tutorial! Let's learn essential Windows CMD commands the easy way with clear steps and real examples.

File Management

These commands let you create, delete, copy, and move files and folders directly from the command line — no mouse needed!

Create a New Folder
To create a new directory (folder) inside the current location:
mkdir [folder]
Example:
mkdir my-project
Delete an Empty Folder
To remove an empty directory (the folder must have no files inside):
rmdir [folder]
Delete a File
To permanently delete a file from the current directory:
del [file]
Example:
del notes.txt
Copy a File to a New Location
To make a copy of a file and place it in a different location (original stays intact):
copy [src] [dest]
Example:
copy notes.txt C:\Backup\notes.txt
Move a File to a New Location
To move a file to a different directory (original is removed from source):
move [src] [dest]
Example:
move notes.txt C:\Archive\notes.txt

Network Commands

These commands help you view and test your network connection — useful for diagnosing internet or connectivity issues without opening a browser.

Display Network IP Information
To see your computer's IP address, subnet mask, default gateway, and other network details:
ipconfig
Test Network Connection to a Host
To check whether you can reach a website or server (like checking if your internet is working):
ping [host]
Example — ping Google's servers:
ping google.com

System Commands

These commands let you monitor and control running processes on your Windows system — think of them as a command-line version of the Task Manager.

Show Running Tasks / Processes
To display a list of all currently running programs and background processes:
tasklist
Force Kill a Task by Name
To forcefully stop a running process using its program name (useful when an app freezes):
taskkill /F /IM [name]
Example — force close Chrome:
taskkill /F /IM chrome.exe
Close the Command Prompt
To close the current Command Prompt window when you're done:
exit

Getting Started

Open Command Prompt
Press Windows + R, type cmd, and press Enter. Or search for "Command Prompt" in the Start menu.

Quick Reference Table

Command Description
cd\ Go to root directory
cd [path] Change to specific directory
cd .. Go back one directory
cls Clear the screen
dir List files and folders
mkdir [folder] Create a new folder
rmdir [folder] Delete an empty folder
del [file] Delete a file
copy [src] [dest] Copy a file to a new location
move [src] [dest] Move a file to a new location
ipconfig Display network IP information
ping [host] Test network connection to a host
tasklist Show running tasks/processes
taskkill /F /IM [name] Force kill a task by name
exit Close the Command Prompt

We'll cover more advanced CMD commands in the next section 🚀