This is from Beginner to Advanced, Categorized for Easy Learning of Windows CMD commands and examples. I hope this is very useful for you and your learning purpose.
๐ 1. File & Folder Management
| Command | Description | Example |
|---|---|---|
dir | List files and folders | dir /s |
cd | Change directory | cd Documents |
mkdir/ md | Create new folder | mkdir Projects |
del | Delete file(s) | del file.txt |
copy | Copy file(s) | copy file.txt D:\Backup |
move | Move or rename file(s) | move file.txt D:\Docs |
ren | Rename a file | ren old.txt new.txt |
attrib | View/change file attributes | attrib +r file.txt |
๐งญ 2. Navigation & Display
| Command | Description | Example |
|---|---|---|
cls | Clear screen | cls |
exit | Close CMD window | exit |
echo | Display message | echo Hello, World! |
type | Show file contents | type notes.txt |
tree | Show folder structure | tree /f |
๐ 3. Network & Internet Tools
| Command | Description | Example |
|---|---|---|
ipconfig | Show IP settings | ipconfig /all |
ping | Test network connection | ping google.com |
tracert | Trace route to host | tracert 8.8.8.8 |
netstat | Show active connections | netstat -an |
nslookup | DNS lookup | nslookup microsoft.com |
netsh | Network configuration | netsh wlan show profiles |
๐ฅ๏ธ 4. System Info & Diagnostics
| Command | Description | Example |
|---|---|---|
systeminfo | Show system details | systeminfo |
hostname | Show computer name | hostname |
ver | Show Windows version | ver |
tasklist | List running processes | tasklist |
taskkill | Kill a process | taskkill /PID 1234 /F |
sfc | System file checker | sfc /scannow |
chkdsk | Check disk for errors | chkdsk /f |
๐ 5. User & Security Management
| Command | Description | Example |
|---|---|---|
net user | Manage user accounts | net user John /add |
net localgroup | Manage user groups | net localgroup Administrators John /add |
whoami | Show current user | whoami |
runas | Run as another user | runas /user:Admin cmd |
icacls | Modify file permissions | icacls file.txt /grant John:F |
takeown | Take file ownership | takeown /f file.txt |
๐พ 6. Disk & Storage Utilities
| Command | Description | Example |
|---|---|---|
diskpart | Partition management | diskpart |
format | Format a drive | format D: |
defrag | Defragment a drive | defrag C: |
fsutil | Advanced file system tasks | fsutil dirty query C: |
โ๏ธ 7. Boot & Configuration
| Command | Description | Example |
|---|---|---|
bcdedit | Edit boot configuration | bcdedit /set {current} safeboot minimal |
msconfig | System configuration tool | msconfig |
regedit | Registry editor | regedit |
gpupdate | Update Group Policy | gpupdate /force |
๐งช 8. Power Tools & Scripting
| Command | Description | Example |
|---|---|---|
powershell | Launch PowerShell | powershell |
wmic | WMI command-line tool | wmic cpu get name |
schtasks | Schedule tasks | schtasks /create /tn "Backup" /tr backup.bat /sc daily /st 10:00 |
for,if,goto | Batch scripting logic | Used in |