Windows CMD and PowerShell Cheat Sheet¶
A quick-reference cheat sheet for Windows Command Prompt (CMD) and PowerShell, covering file navigation, system management, and package provisioning.
File and System Navigation¶
List Files — dir:
Change Directory — cd [folder]:
Make Directory — mkdir [name]:
Move/Rename — move [src] [dest]:
Copy File — copy [src] [dest]:
Delete File — del [file]:
Clear Screen — cls:
Show File Content — type [file]:
Check IP Address — ipconfig:
System & Networking¶
List Services — sc query:
Stop Service — net stop [name]:
List Running Apps — tasklist:
Kill a Process — taskkill /F /IM [app].exe:
Check Network Path — tracert [url]:
Environment Vars — set:
Package Management (Winget)¶
- Search for an app:
winget search [app_name] - Install an app:
winget install [app_name] - Update all apps:
winget upgrade --all - Uninstall an app:
winget uninstall [app_name]
Command Line Tips¶
- Administrator Access: Many system commands require running the terminal as an Administrator. Right-click the Start button and select Terminal (Admin).
- PowerShell Aliases: PowerShell includes built-in aliases (like
lsandrm) for faster navigation. - The Pipeline: Unlike CMD which passes raw text, PowerShell passes structured objects between commands, allowing for advanced data filtering and manipulation.