Command Prompt (CMD) Guide for Beginners
What is Command Prompt?
Command Prompt (cmd.exe) is a command-line interpreter in Windows that lets you interact with your computer through text commands.Today we are going to learn how to use command prompt

Opening Command Prompt
Quick Methods:
- Windows Key + R → type
cmd→ Enter - Search → type “cmd” or “Command Prompt”
- File Explorer → type
cmdin address bar → Enter
Advanced (Run as Administrator):
- Right-click Start Menu → “Command Prompt (Admin)”
- Needed for commands requiring elevated privileges
Essential Navigation Commands
View current directory
dir # Lists contents of current folder
dir /w # Wide format listing
dir /p # Pauses after each screen
Change directory
cd folder_name # Enter a folder
cd .. # Go up one level
cd \ # Go to root of current drive
cd /d D:\Folder # Switch to different drive/folder
Drive management
D: # Switch to D: drive
Basic File Operations
Create files/folders
mkdir folder_name # Create new folder
type nul > file.txt # Create empty file
echo text > file.txt # Create file with content
Copy files/folders
copy source.txt destination.txt
xcopy source destination /E # Copy folders with subfolders
robocopy source destination /E # More advanced copying
Move/Rename
move old.txt new.txt
rename old.txt new.txt
Delete
del file.txt # Delete file
rmdir folder_name # Delete empty folder
rmdir /s folder_name # Delete folder with contents
System Information Commands
systeminfo # Detailed system info
hostname # Display computer name
whoami # Show current user
ver # Windows version
ipconfig # Network information
ipconfig /all # Detailed network info
Network Commands
ping google.com # Test connection to website
tracert google.com # Trace route to destination
netstat -an # Show active connections
Useful Utilities
Text display/manipulation
echo Hello World # Display text
type file.txt # Show file contents
more file.txt # Show file page by page
Find/search
find "text" file.txt # Search for text in file
findstr "pattern" *.txt # Search with regex patterns
Compare files
fc file1.txt file2.txt # Compare two files
Task management
tasklist # Show running processes
taskkill /PID 1234 # Kill process by PID
taskkill /IM notepad.exe # Kill by program name
Tips & Tricks
- Tab Completion: Press Tab to auto-complete file/folder names
- Command History: Up/Down arrows to cycle through previous commands
- Clear Screen:
cls - Help System: Append
/?to any command for help
cd /?
dir /?
- Copy/Paste:
- Right-click → Paste
- Ctrl + C to cancel command
- Ctrl + V to paste (in newer Windows versions)
Common Tasks Examples
1. Create and navigate project structure
mkdir MyProject
cd MyProject
mkdir src docs tests
2. Batch rename files
ren *.txt *.bak
3. Check disk space
wmic logicaldisk get size,freespace,caption
4. Create backup of important files
robocopy C:\Documents D:\Backup\Documents /E
5. Schedule tasks (opens Task Scheduler)
control schedtasks
Practice Exercises
- Navigate to your Desktop and list all files
- Create a folder called “test” with 3 text files inside
- Copy those files to a backup folder
- Check your IP address and ping Google
- Create a batch file (.bat) with simple commands
Safety Notes
- Be cautious with delete commands
- Administrator mode gives full system access
- Some commands can’t be undone
- When in doubt, use
/helpor/?for command information
If you have any query , feel free to type in comment box !