Windows CMD Commands
Command Prompt commands for files, system, network, and user management
Your data never leaves the browser — all processing is done locally 0 server requests
Files & Folders
-
dirList files in the current folder (dir /a includes hidden files)
-
cd 경로Change directory (cd .. goes up, d: switches drive)
-
mkdir 폴더명Create a new folder
-
rmdir /s /q 폴더명Delete a folder and all its contents without confirmation ※ caution
-
del /f /q 파일명Force delete a file without prompting
-
copy 원본 대상Copy a file to a destination
-
xcopy 원본 대상 /e /h /yCopy including subdirectories and hidden files
-
robocopy 원본 대상 /eRobust copy tool for large or network transfers (/mir mirrors but deletes destination files not in source)
-
move 원본 대상Move a file or folder (ren to rename)
-
type 파일명Print the contents of a text file
-
tree /fDisplay the folder structure as a tree including files
System Management
-
systeminfoDisplay system information such as OS version and memory
-
tasklistList all running processes
-
tasklist | findstr 프로그램명Filter the process list to find a specific program
-
taskkill /im 프로그램.exe /fForce terminate a process by name
-
taskkill /pid 1234 /fForce terminate a process by PID
-
shutdown /s /t 0Shut down immediately (/r to reboot)
-
shutdown /aCancel a scheduled shutdown
-
sfc /scannowScan and repair corrupted system files (requires admin)
-
chkdsk C: /fCheck and fix disk errors (requires admin)
-
winverOpen the Windows version dialog
-
clsClear the screen
Network
-
ipconfigShow IP address and gateway (/all shows MAC, DNS, and more)
-
ipconfig /flushdnsFlush the DNS cache (fixes site access issues)
-
ipconfig /release && ipconfig /renewRelease and renew the IP address
-
ping 주소Test connectivity to an address (-t pings continuously)
-
tracert 주소Trace the network route to a destination
-
nslookup 도메인Look up DNS information for a domain
-
netstat -anoShow active connections with port numbers and PIDs
-
netstat -ano | findstr :8080Find the process using a specific port
-
arp -aShow IP and MAC addresses of devices on the local network
-
netsh wlan show profilesList saved Wi-Fi profiles
-
netsh wlan show profile name="와이파이명" key=clearShow the saved Wi-Fi password (local PC only)
Users & Permissions
-
whoamiShow the currently logged-in user
-
net userList user accounts on the PC (net user name for details)
-
net localgroup administratorsShow accounts in the administrators group
-
runas /user:Administrator cmdRun a program as a different user
Utilities
-
echo %PATH%Print the value of an environment variable (set lists all)
-
where 프로그램명Find the path of an executable
-
findstr "텍스트" 파일명Search for text inside a file
-
fc 파일1 파일2Compare the contents of two files
-
tasklist | clipCopy command output to the clipboard
-
driverqueryList all installed drivers
-
powershellSwitch to PowerShell (exit to return)
Windows CMD: Getting Things Done from the Command Prompt
Windows Command Prompt (cmd.exe) lets you perform file operations, system diagnostics, network troubleshooting, and user management faster than using the GUI. Key commands include ipconfig /flushdns for DNS issues, netstat -ano for port conflicts, and taskkill for unresponsive programs.
The netsh wlan show profile command reveals saved Wi-Fi passwords — it applies only to your own PC's saved profiles. For system health checks, run sfc /scannow followed by chkdsk to diagnose most file system problems.
⚠ rmdir /s /q, del /f, and robocopy /mir delete or overwrite files without confirmation. Always verify the target path before running these commands.
FAQ
- A command says I need administrator privileges.
- Search for "cmd" in the Start menu, right-click "Command Prompt," and select "Run as administrator." Commands like sfc, chkdsk, and net user changes require an elevated prompt.
- How do I find and kill the process using a specific port?
- Run netstat -ano | findstr :PORT to find the PID, then tasklist | findstr PID to identify the process, and taskkill /pid PID /f to terminate it.
- Should I use CMD or PowerShell?
- CMD is sufficient for quick checks, network diagnostics, and simple file operations. PowerShell is better for scripting, automation, and object-based data handling. Most CMD commands work in PowerShell too.