Command Line
Windows Command Line Cheat Sheet
Comprehensive Windows Command Line Cheat Sheet for beginners. Learn essential commands to navigate, manage files, troubleshoot, and more with clear examples.

Use this Windows Command Line cheat sheet as a quick reference to essential commands. It covers navigating directories, managing files, controlling processes, troubleshooting, and other common Windows command line workflows.
Free Software Testing Fundamentals
If you are learning command line skills because you want to move into software testing or QA automation, start with the free Software Testing Fundamentals course.
Learn Software Testing Fundamentals
Navigating The File System
| Command | What It Does | Example |
|---|---|---|
cd | Change the current directory. | cd \path\to\directory |
cd .. | Move up one directory. | cd .. |
dir | List directory contents. | dir |
tree | Display directory structure in a tree format. | tree |
File And Directory Management
| Command | What It Does | Example |
|---|---|---|
mkdir | Create new directories. | mkdir new_folder |
rmdir | Remove directories. | rmdir folder |
rmdir /s | Remove a directory and its contents. | rmdir /s folder |
del | Delete one or more files. | del file.txt |
copy | Copy files from one location to another. | copy file1.txt file2.txt |
move | Move or rename files or directories. | move old_name.txt new_name.txt |
Viewing And Editing Files
| Command | What It Does | Example |
|---|---|---|
type | Display the contents of a text file. | type file.txt |
notepad | Open a file in Notepad. | notepad file.txt |
Searching And Filtering Text
| Command | What It Does | Example |
|---|---|---|
find | Search for a text string in a file. | find "search_term" file.txt |
Command Line Tools And Utilities
| Command | What It Does | Example |
|---|---|---|
ipconfig | Display network configuration information. | ipconfig |
ipconfig /all | Display detailed network information. | ipconfig /all |
ping | Send ICMP ECHO_REQUEST to network hosts to test connectivity. | ping google.com |
ping -n | Limit ping to a specific number of packets. | ping -n 4 google.com |
tracert | Trace the route packets take to the destination. | tracert google.com |
netstat | Display network connections, routing tables, and interface statistics. | netstat |
Managing Processes
| Command | What It Does | Example |
|---|---|---|
tasklist | Display a list of currently running processes. | tasklist |
taskkill /PID | Terminate a process by its PID. | taskkill /PID 1234 |
taskkill /IM | Terminate a process by image name. | taskkill /IM notepad.exe |
System Information And Maintenance
| Command | What It Does | Example |
|---|---|---|
systeminfo | Display detailed system information. | systeminfo |
chkdsk | Check the file system and status of hard drives. | chkdsk |
chkdsk /f | Check the file system and fix errors. | chkdsk /f |
sfc | Scan and repair system files. | sfc /scannow |
shutdown /s | Shut down the computer. | shutdown /s |
shutdown /r | Restart the computer. | shutdown /r |
