Windows Command Prompt, commonly known as CMD, is a powerful command-line tool built into Windows. It allows users to manage files and folders, check network connections, view system information, manage processes, and perform many other tasks using text commands.
This Windows CMD Commands List includes useful Command Prompt commands with simple explanations and practical examples. It can be used as a quick reference for beginners, developers, system administrators, and everyday Windows users.
Windows CMD Commands Quick Reference
Use the table below to quickly find common Windows Command Prompt commands and learn what each command does.
| Command | What It Does |
|---|---|
dir | Displays files and folders in the current directory |
cd | Changes the current directory |
cls | Clears the Command Prompt screen |
mkdir | Creates a new directory or folder |
rmdir | Removes a directory or folder |
copy | Copies files from one location to another |
move | Moves files or folders to another location |
del | Deletes files |
ren | Renames a file or folder |
type | Displays the contents of a text file |
ipconfig | Displays IP and network configuration information |
ping | Tests basic network connectivity |
tracert | Shows the network route to a destination |
nslookup | Queries DNS information |
netstat | Displays network connections and statistics |
hostname | Displays the computer hostname |
systeminfo | Displays detailed Windows system information |
tasklist | Displays currently running processes |
taskkill | Terminates a running process |
sfc | Checks and repairs protected Windows system files |
chkdsk | Checks a disk and file system for errors |
shutdown | Shuts down or restarts Windows |
whoami | Displays the current Windows user |
echo | Displays text or environment variable values |
set | Displays or sets environment variables |
path | Displays or modifies the executable search path |
find | Searches for text in files |
findstr | Searches for text patterns in files or command output |
tree | Displays a directory structure as a tree |
attrib | Displays or changes file attributes |
fc | Compares two files |
date | Displays or changes the system date |
time | Displays or changes the system time |
ver | Displays the Windows version |
vol | Displays disk volume information |
label | Displays or changes a drive label |
diskpart | Manages disks and partitions |
format | Formats a disk or drive |
gpupdate | Updates Group Policy settings |
gpresult | Displays applied Group Policy information |
net | Manages various Windows network and service functions |
sc | Queries and manages Windows services |
driverquery | Displays installed device driver information |
powercfg | Manages Windows power configuration |
getmac | Displays MAC addresses for network adapters |
arp | Displays and manages the ARP cache |
route | Displays or modifies the IP routing table |
pathping | Analyzes network routes and packet loss |
1. DIR – List Files and Folders
The dir command displays files and folders in the current directory. It is one of the most commonly used CMD commands for navigating and managing files.
dir
2. CD – Change Directory
The cd command changes the current working directory in Command Prompt.
cd Documents
To move up one directory level, use:
cd ..
3. CLS – Clear the CMD Screen
The cls command clears the existing output from the Command Prompt window.
cls
4. MKDIR – Create a Folder
Use mkdir to create a new directory or folder.
mkdir MyFolder
5. COPY – Copy Files
The copy command copies one or more files from one location to another.
copy file.txt D:\Backup\
6. MOVE – Move Files
The move command moves files or folders to another location.
move file.txt D:\Documents\
7. DEL – Delete Files
The del command deletes files from the specified location. Always verify the file path before using it.
del example.txt
8. IPCONFIG – View Network Information
The ipconfig command displays basic IP address and network configuration information.
ipconfig
For more detailed information, use:
ipconfig /all
9. PING – Test Network Connectivity
The ping command tests basic network connectivity between your computer and another host or IP address.
ping google.com
10. TRACERT – Trace a Network Route
The tracert command shows the network path or hops used to reach a destination.
tracert google.com
11. NSLOOKUP – Query DNS Information
The nslookup command performs DNS queries and can be useful for checking domain name resolution.
nslookup example.com
12. NETSTAT – View Network Connections
The netstat command displays network connections, listening ports, and related network statistics.
netstat -ano
13. SYSTEMINFO – View System Information
The systeminfo command displays detailed information about the Windows operating system and computer configuration.
systeminfo
14. TASKLIST – View Running Processes
The tasklist command displays processes that are currently running on the computer.
tasklist
15. TASKKILL – Terminate a Process
The taskkill command can be used to terminate a running process. Make sure you identify the correct process before using it.
taskkill /PID 1234 /F
16. SFC – Check Windows System Files
The System File Checker can scan protected Windows system files and attempt to repair problems when possible.
sfc /scannow
17. CHKDSK – Check a Disk
The chkdsk command checks a disk and its file system for errors. Some options can also be used to perform repair operations.
chkdsk C:
18. SHUTDOWN – Shut Down or Restart Windows
The shutdown command allows you to shut down or restart Windows from Command Prompt.
shutdown /r /t 0
19. WHOAMI – Display the Current User
The whoami command displays the Windows account currently being used in the Command Prompt session.
whoami
20. TREE – Display Folder Structure
The tree command displays folders and subfolders in a tree-like structure.
tree
Useful CMD Examples
Here are a few practical commands that Windows users may find useful:
:: Display detailed IP information
ipconfig /all
:: Test network connectivity
ping google.com
:: Clear the DNS resolver cache
ipconfig /flushdns
:: Display running processes
tasklist
:: Display Windows system information
systeminfo
:: Display the current Windows user
whoami
:: Restart Windows immediately
shutdown /r /t 0
How to Open Command Prompt in Windows
You can open Command Prompt by searching for Command Prompt or cmd from the Windows Start menu. Some commands require elevated permissions, so you may need to select Run as administrator.
Use CMD Commands Carefully
Some Command Prompt commands can modify or delete data and change system settings. Commands such as del, rmdir, format, and diskpart should be used carefully. Always check the command and target path before executing potentially destructive operations.
Find the Right Windows Command
Not sure which command you need? Use the Windows Command Generator to search for useful CMD and PowerShell commands by keyword, task, or category.
Frequently Asked Questions
What is a Windows CMD command?
A Windows CMD command is a text instruction that can be entered into Command Prompt to perform a specific task or display system information.
Which CMD command shows the IP address?
The ipconfig command displays IP address and network configuration information. Use ipconfig /all for more detailed network information.
How can I see running processes in CMD?
Use the tasklist command to display processes currently running on your Windows computer.
How do I check Windows system files?
You can use sfc /scannow to run the Windows System File Checker and scan protected system files.
Can I use CMD commands without administrator access?
Many basic CMD commands work without administrator access. However, some system-level operations require an elevated Command Prompt.
Conclusion
Windows CMD commands provide a fast way to manage files, inspect system information, troubleshoot network connections, and perform various Windows administration tasks. This list can serve as a convenient reference whenever you need a Command Prompt command.
If you know what you want to do but are not sure which CMD command to use, try the Windows Command Generator to find the right command faster.
Leave a Comment
Join the discussion. Please keep comments respectful.