Perfect ๐ฅ Let’s create a “Windows CMD — One Shot Tutorial (Beginner to Advanced 2025)” guide that you can use to learn fully, make notes, or even teach on YouTube.
We’ll go from 0 to expert, covering every practical and powerful CMD concept you’ll actually use in 2025.
๐ง CMD (Command Prompt) — One Shot Tutorial (Beginner to Advanced 2025)
๐ฏ Overview
CMD (Command Prompt) is the Windows command-line interpreter — used to automate tasks, manage files, control networking, and access system info.
๐งฉ 1. Getting Started
๐น Open CMD
-
Search:
cmd
→ Run as administrator -
Shortcut:
Win + R
→ typecmd
→ Enter -
Admin Mode:
Ctrl + Shift + Enter
๐น Basic Info
ver # Show Windows version
help # List all available commands
help <command> # Detailed help for a specific command
๐️ 2. File & Folder Commands
๐ Navigation
dir # List files and folders
cd # Show current directory
cd <path> # Change directory
cd .. # Go up one folder
cls # Clear screen
๐งฑ File Operations
mkdir <folder> # Create folder
rmdir <folder> # Remove folder (empty)
del <file> # Delete file
copy <src> <dest> # Copy file
move <src> <dest> # Move file
rename <old> <new> # Rename file
๐งพ View Content
type <file> # Display file contents
more <file> # Display one page at a time
⚙️ 3. System & Device Info
systeminfo # Full system details
hostname # Show computer name
ipconfig # Network details
ipconfig /all # Full network details
tasklist # All running processes
taskkill /IM <process.exe> /F # Force close process
driverquery # List installed drivers
wmic cpu get name # CPU info
wmic bios get serialnumber
๐ 4. Network & Internet Commands
ping <website> # Test connection
tracert <website> # Trace route to website
netstat -ano # View active connections and ports
nslookup <website> # Get IP of website
netsh wlan show profile # Show saved Wi-Fi profiles
netsh wlan show profile name=<WiFiName> key=clear # Show Wi-Fi password
๐ก Pro Tip: netstat -b
shows which programs are using which ports (use admin CMD).
๐งฎ 5. System Control & Utilities
shutdown /s /t 0 # Shutdown immediately
shutdown /r /t 5 # Restart after 5 seconds
chkdsk # Check disk errors
sfc /scannow # Scan and repair system files
taskmgr # Open Task Manager
control # Open Control Panel
appwiz.cpl # Programs & Features
๐ก 6. User Management (Admin Required)
net user # Show all users
net user <username> <pass> /add # Add user
net localgroup administrators <username> /add # Make admin
net user <username> /delete # Delete user
๐ง 7. Environment & Variables
set # Show all environment variables
set <var>=<value> # Create variable
echo %<var>% # Print variable
path # Show PATH
Example:
set name=RedMark
echo Hello %name%
๐ป 8. Batch File Basics (.bat Scripts)
You can automate commands using a .bat
file.
Example:
@echo off
echo Starting Backup...
xcopy C:\Users\RedMark\Documents D:\Backup /E /I /Y
echo Backup Complete!
pause
Save as backup.bat
→ Run.
๐งฐ 9. Advanced Commands (2025 Pro Level)
powercfg /batteryreport /output "battery.html" # Generate battery health report
getmac # Get MAC address
net share # List network shares
wmic product get name,version # Installed apps list
schtasks /create /sc daily /tn "Backup" /tr "C:\backup.bat" /st 21:00
๐งจ 10. CMD Tricks & Customization
๐จ Customize Look
color a # Green text
color 4e # Red on gray background
title RedMark CMD PowerShell
⏰ Time & Date
time /t
date /t
๐ช Fun Tricks
tree /f # Show folder structure
echo Hello, World!
⚡ 11. Combining Commands
&&
, ||
, and |
mkdir Test && cd Test # Run second only if first succeeds
ping google.com || echo "Failed"
dir | find "txt" # Filter output
๐ก️ 12. Security & Permissions
attrib +h +s <file> # Hide and protect file
attrib -h -s <file> # Unhide
cipher /w:C:\ # Wipe free space securely
๐งพ 13. Log & Output Handling
dir > output.txt # Save output to file
echo Hello >> log.txt # Append text
๐งฉ 14. Power CMD (For Devs)
assoc .py=Python.File
where python # Find path of installed program
fc file1.txt file2.txt # Compare files
๐ 15. Mastery Projects
-
Create a System Cleaner Script
-
Auto Backup Scheduler using Task Scheduler + CMD
-
Wi-Fi Password Viewer
-
Disk Space Report Generator
-
Custom Command Launcher
๐ง BONUS: CMD vs PowerShell
Feature | CMD | PowerShell |
---|---|---|
Syntax | Basic | Object-oriented |
Scripting | .bat | .ps1 |
Automation | Limited | Advanced |
Output | Text only | Objects & JSON |
๐ Conclusion
✅ You now know everything from Beginner → Advanced CMD (2025 Edition)
✅ You can automate, control, and troubleshoot Windows fully using CMD
✅ Next Step: Learn PowerShell for modern scripting + automation
No comments:
Post a Comment