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.

Windows Command Line Cheat Sheet thumbnail

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

CommandWhat It DoesExample
cdChange the current directory.cd \path\to\directory
cd ..Move up one directory.cd ..
dirList directory contents.dir
treeDisplay directory structure in a tree format.tree

File And Directory Management

CommandWhat It DoesExample
mkdirCreate new directories.mkdir new_folder
rmdirRemove directories.rmdir folder
rmdir /sRemove a directory and its contents.rmdir /s folder
delDelete one or more files.del file.txt
copyCopy files from one location to another.copy file1.txt file2.txt
moveMove or rename files or directories.move old_name.txt new_name.txt

Viewing And Editing Files

CommandWhat It DoesExample
typeDisplay the contents of a text file.type file.txt
notepadOpen a file in Notepad.notepad file.txt

Searching And Filtering Text

CommandWhat It DoesExample
findSearch for a text string in a file.find "search_term" file.txt

Command Line Tools And Utilities

CommandWhat It DoesExample
ipconfigDisplay network configuration information.ipconfig
ipconfig /allDisplay detailed network information.ipconfig /all
pingSend ICMP ECHO_REQUEST to network hosts to test connectivity.ping google.com
ping -nLimit ping to a specific number of packets.ping -n 4 google.com
tracertTrace the route packets take to the destination.tracert google.com
netstatDisplay network connections, routing tables, and interface statistics.netstat

Managing Processes

CommandWhat It DoesExample
tasklistDisplay a list of currently running processes.tasklist
taskkill /PIDTerminate a process by its PID.taskkill /PID 1234
taskkill /IMTerminate a process by image name.taskkill /IM notepad.exe

System Information And Maintenance

CommandWhat It DoesExample
systeminfoDisplay detailed system information.systeminfo
chkdskCheck the file system and status of hard drives.chkdsk
chkdsk /fCheck the file system and fix errors.chkdsk /f
sfcScan and repair system files.sfc /scannow
shutdown /sShut down the computer.shutdown /s
shutdown /rRestart the computer.shutdown /r
Windows Command Line Cheat Sheet | SuperSQA