Windows Command Line Cheat Sheet
Use this Windows Command Line cheat sheet as a quick reference to essential commands! Covering everything from navigating directories and managing files to controlling processes, this guide is perfect for beginners and experienced users. Improve your productivity, simplify workflows, and access helpful tips to make the most out of the command line on Windows.
Navigating the File System
cd - Change the current directory.
cd \path\to\directory
cd ..
(move up one directory)
dir - List directory contents.
dir
tree - Display directory structure in a tree format.
tree
File and Directory Management
mkdir - Create new directories.
mkdir new_folder
rmdir - Remove directories.
rmdir folder
rmdir /s folder
(remove directory and its contents)
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
type - Display the contents of a text file.
type file.txt
notepad - Open a file in Notepad.
notepad file.txt
Searching and Filtering Text
find - Search for a text string in a file.
find "search_term" file.txt
Command Line Tools and Utilities
ipconfig - Display network configuration information.
ipconfig
ipconfig /all
(detailed information)
ping - Send ICMP ECHO_REQUEST to network hosts to test connectivity.
ping google.com
ping -n 4 google.com
(limit to 4 packets)
tracert - Trace the route packets take to the destination.
tracert google.com
netstat - Display network connections, routing tables, and interface statistics.
netstat
Managing Processes
tasklist - Display a list of currently running processes.
tasklist
taskkill - Terminate a process by its PID or image name.
taskkill /PID 1234
taskkill /IM notepad.exe
(terminate by image name)
System Information and Maintenance
systeminfo - Display detailed system information.
systeminfo
chkdsk - Check the file system and status of the hard drives.
chkdsk
chkdsk /f
(fix errors)
sfc - Scan and repair system files.
sfc /scannow
shutdown - Shutdown or restart the computer.
shutdown /s
(shutdown)
shutdown /r
(restart)
Learn Python & QA Automation With Self-Paced Video Courses
Python | Selenium WebDriver | API Testing | SQL | Robot Framework | BDD (Cucumber)
Stay connected with news and updates!
Join our mailing list to receive the latest news and updates from our team.
Don't worry, your information will not be shared.
We hate SPAM. We will never sell your information, for any reason.