70+ Essential Windows CMD Commands for Beginners to Advanced Users
Discover over 70 vital Windows CMD commands every user should know—from basic file operations to advanced system administration tools. This comprehensive guide explains how to use each command with clear categories, practical use cases, and a reference table, making it ideal for beginners, IT professionals, and system administrators who want to boost productivity and take full control of their Windows environment.

Table of Contents
- Why Learn Windows Commands?
- Types of Windows Commands Covered
- File and Directory Commands
- System Information Commands
- Network Commands
- Disk and Drive Commands
- Task and Process Management Commands
- User and Security Commands
- Power and Shutdown Commands
- Windows Troubleshooting Commands
- Advanced and Miscellaneous Commands
- CMD Scripting and Batch Commands
- Bonus Useful Commands
- Conclusion
- Frequently Asked Questions (FAQs)
The Windows Command Line (CMD) is a powerful tool for developers, system admins, and IT professionals. Whether you’re managing networks, automating tasks, or troubleshooting systems, knowing essential Windows commands can dramatically boost your efficiency. In this blog, we will explore 70+ vital CMD commands every Windows user should know to take full control of their system.
Why Learn Windows Commands?
Learning Windows commands allows you to:
-
Automate repetitive tasks
-
Troubleshoot faster
-
Access advanced system functions
-
Work without GUI reliance
-
Script and deploy commands for multiple machines
Types of Windows Commands Covered
Category | Description |
---|---|
File & Directory Commands | For managing files and folders |
System Info Commands | Get details about OS, hardware, and users |
Network Commands | Manage IP, DNS, and network connections |
Disk & Partition Commands | Handle drives, check disk health, format disks |
Task & Process Commands | Manage processes, services, and tasks |
Security Commands | Control users, passwords, and permissions |
Power & Shutdown Commands | Schedule or automate power actions |
Miscellaneous Commands | Useful extras not fitting into above categories |
File and Directory Commands
1. dir
Lists files and directories in the current folder.
2. cd
Changes the directory you're working in.
3. mkdir
or md
Creates a new directory.
4. rmdir
or rd
Deletes a directory.
5. del
Deletes one or more files.
6. copy
Copies files from one location to another.
7. xcopy
Extended copy for files and directories.
8. move
Moves files or renames them.
9. attrib
Displays or changes file attributes (like hidden, read-only).
10. ren
Renames files or directories.
System Information Commands
11. systeminfo
Displays detailed configuration info about the computer.
12. hostname
Shows the name of the computer.
13. ver
Shows the Windows version.
14. set
Displays environment variables.
15. wmic
A powerful tool for system administration via CMD.
16. whoami
Displays current logged-in username.
17. tasklist
Lists all running tasks on the system.
Network Commands
18. ipconfig
Shows IP configuration.
19. ping
Tests network connectivity to another host.
20. tracert
Shows the path taken to reach a host.
21. netstat
Displays network connections and ports.
22. nslookup
Queries DNS for domain name resolution.
23. arp
Displays and modifies ARP cache.
24. route
Shows and edits the routing table.
25. net use
Maps network drives.
26. netstat -an
Shows all active TCP/UDP connections.
27. netsh
Advanced configuration for network settings.
Disk and Drive Commands
28. chkdsk
Checks disk for errors and repairs them.
29. diskpart
Manages partitions and disks.
30. format
Formats a specified drive.
31. label
Creates or changes volume labels.
32. vol
Displays volume label and serial number.
33. fsutil
Advanced disk utility functions.
Task and Process Management Commands
34. taskkill
Ends a task or process.
35. schtasks
Creates, deletes, or manages scheduled tasks.
36. sc
Controls Windows services.
37. shutdown
Performs shutdown, restart, or logoff operations.
38. start
Starts a program or command in a new window.
39. pause
Pauses a batch file or command execution.
40. timeout
Waits for specified time, ideal for scripting delays.
User and Security Commands
41. net user
Manages user accounts.
42. net localgroup
Manages local group memberships.
43. runas
Runs programs as another user.
44. cacls
Modifies file permissions.
45. icacls
More advanced version of cacls
.
46. lock
Locks the workstation.
47. gpupdate
Updates Group Policy settings.
48. secedit
Applies security settings from templates.
Power and Shutdown Commands
49. powercfg
Manages power settings and battery info.
50. shutdown /s /t 0
Immediately shuts down the computer.
51. shutdown /r /t 0
Immediately restarts the computer.
52. shutdown /l
Logs off the current user.
Windows Troubleshooting Commands
53. sfc /scannow
Scans and repairs system files.
54. DISM
Manages and repairs Windows images.
55. cleanmgr
Launches disk cleanup utility.
56. eventvwr
Opens the Event Viewer.
57. msinfo32
Opens system information viewer.
Advanced and Miscellaneous Commands
58. tree
Displays folder structure in a tree format.
59. echo
Displays messages or turns command echoing on/off.
60. cls
Clears the CMD screen.
61. title
Sets the title for the CMD window.
62. color
Changes CMD window text/background color.
63. exit
Closes the command prompt.
64. prompt
Changes the CMD prompt text.
65. help
Displays available commands and help.
CMD Scripting and Batch Commands
66. if
Used for conditional logic in batch files.
67. for
Loops through a range of values in scripts.
68. goto
Directs the command flow to a labeled line.
69. call
Calls another batch file or function.
70. setlocal
/ endlocal
Manages variable scope in batch files.
Bonus Useful Commands
71. clip
Redirects command output to clipboard.
72. find
Searches for a text string in files.
73. assoc
Displays or changes file associations.
74. driverquery
Lists installed drivers.
75. taskview
Access task view interface (via Windows shortcut or script).
Conclusion
Mastering these 70+ Windows commands equips you with the tools needed to become an efficient and confident power user. Whether you're troubleshooting, scripting, or managing systems, knowing these commands will save time and reduce dependency on graphical tools. Bookmark this blog as a reference, and start practicing these commands on your Windows system today!
FAQs
What are the most useful Windows CMD commands?
Some of the most useful Windows CMD commands include ipconfig
, ping
, tasklist
, chkdsk
, shutdown
, netstat
, dir
, and systeminfo
.
What is CMD used for in Windows?
CMD is used for executing command-line instructions to perform administrative tasks, troubleshoot systems, and automate operations.
Is the Windows Command Prompt still relevant in 2025?
Yes, the Windows Command Prompt remains a vital tool for scripting, diagnostics, and advanced configuration, especially for system administrators and developers.
What’s the difference between CMD and PowerShell?
CMD is simpler and better for basic commands, while PowerShell is more powerful with scripting capabilities and deeper access to system objects.
Can I learn CMD without prior experience?
Absolutely! CMD is beginner-friendly. Start with basic commands like dir
, cd
, and copy
, then gradually explore more advanced ones.
How do I open the Command Prompt in Windows?
Press Win + R
, type cmd
, and hit Enter. You can also search for "Command Prompt" in the Start menu.
How do I run CMD as an administrator?
Right-click on the Command Prompt icon and choose "Run as administrator" to access elevated privileges.
What are file management commands in Windows CMD?
Common file commands include copy
, move
, del
, mkdir
, and ren
. These allow you to organize and modify files directly.
Which CMD command is used to check the system info?
Use systeminfo
to get a detailed report of your system’s OS, hardware, memory, and network information.
Can CMD be used to fix Windows errors?
Yes, commands like sfc /scannow
, DISM
, and chkdsk
are used to repair system files and drive errors.
What is ipconfig
used for?
ipconfig
displays your IP configuration and helps troubleshoot network issues.
How do I kill a task using CMD?
Use taskkill /IM program.exe /F
to forcefully terminate a program.
What does netstat
show in CMD?
netstat
displays network connections, listening ports, and routing tables.
Can CMD manage user accounts?
Yes, commands like net user
and net localgroup
allow for user and group management.
What is the use of shutdown /s /t 0
?
It initiates an immediate system shutdown with no delay.
Which command shows running tasks in CMD?
tasklist
provides a list of all currently running processes.
How do I format a disk using CMD?
Use the format
command followed by the drive letter, like format D:
.
How do I change directory in CMD?
Use the cd
command followed by the folder name or path.
What does chkdsk
do?
It checks for disk errors and attempts to repair them if possible.
Is DISM
safe to use?
Yes, DISM
is a trusted Windows tool for servicing and restoring Windows images.
What command updates group policies?
gpupdate /force
updates all policies on a Windows machine.
What does ping
test in CMD?
ping
tests network connectivity between your PC and another device or website.
What is tracert
used for?
It traces the route that data takes to reach a remote host.
How can I see hidden files using CMD?
Use dir /a:h
to list hidden files in the current directory.
What is the use of tree
command?
tree
displays directory structures in a tree-like format.
How can I copy an entire directory in CMD?
Use xcopy source destination /E /I
to copy all files and subdirectories.
What is echo
used for in CMD?
It displays messages or turns command echoing on/off in scripts.
How do I map a network drive in CMD?
Use net use Z: \\Server\SharedFolder
to assign a network path to a drive letter.
What command lists installed drivers?
Use driverquery
to see all drivers installed on the system.
What does assoc
do in CMD?
It displays or changes file extension associations with programs.