Windows Command Line Cheat Sheet (Online Table and Printable PDF)  

Windows Command Line Cheat Sheet (Online Table and PDF)


PAGE CONTENT:
What is Windows command line?
How do I open a command line in Windows?
Windows Command Line Cheat Sheet
Files & Folders Comands
Disk & Partition Commands
Network Commands
System Information & Configuration Commands
Command Line Setup Commands
Conclusion

The Windows command line is a powerful tool that can be used for a variety of tasks, from basic file and directory management to advanced scripting and automation. To access it, you can open the Windows command prompt, and this article will guide you through the process. Additionally, a Windows command line cheat sheet is provided to help you get started with using this tool.

Windows command prompt

What is Windows command line?

The Windows command line, also known as the command prompt, is a text-based interface where you can execute commands and control your computer. It allows you to perform various tasks, such as launching programs and accessing system settings, and is relatively easy to use with practice.

How do I open a command line in Windows?

To open the command line in Windows, simply open the Start menu by clicking the Start button or pressing the Windows key, then type "cmd" into the search box and press Enter to open the Windows Command Prompt, from which you can execute any desired commands.

Open Windows 11 command prompt

To open the Command Prompt in Windows, you can press the "Windows key + R" on your keyboard, which will open the "Run" dialog box. Then, type "cmd" into the box and press Enter. This will open the Command Prompt.

Run cmd via Windows plus R key

Now that you know how to open command prompt in Windows, you can use it to run various commands to perform tasks on your computer.

Windows Command Line Cheat Sheet

If you're new to the Windows command line, you may feel overwhelmed by the numerous commands and options. However, our Windows command line cheat sheet provides a handy reference guide to the most commonly used commands, making it easy to get started. You can print it out or keep it open on your desktop for quick access, or view the online sheet below to start making the most of the command line.

Command What does it do?

Files & Folders Comands

assoc Fix file associations.
attrib Change file attributes.
cd (or chdir) Change current working directory.
comp Perform a comparison of multiple files.
compact Copy files from one location to another.
del (or erase) Delete files.
dir List files and subfolders.
expand Expand compressed files.
fc File compare.
find Filter a string in files.
findstr Search for patterns of text in files.
md (or mkdir) Create a directory or subdirectory.
move Move files from one directory to another.
openfiles Display the current open files list or disconnect opened files/folders.
print Send a text file to a printer.
rd (or rmdir) Delete a directory.
ren (or rename) Rename a file or directory.
replace Replace existing or add new files to a directory.
robocopy Copy file data from one location to another.
tree Display tree structure of a directory.
type Display the contents of a text file.
xcopy Copy files and directories.

Disk & Partition Commands

active Mark the partition with focus as active.
chkdsk Check disk.
chkntfs The Disk Cleanup tool helps to remove temporary files, system files, and other items you don't need to free up space on your computer. It also allows you to display or modify automatic disk checking when the computer is started.
clean The disk with focus should have all partitions or volume formatting removed from it. This means that the disk should be completely blank, with no existing file system or partition table.
convert Convert a disk from one disk type to another.
create Create partition or volume.
defrag Locates and consolidates fragmented files on local volumes.
delete Delete a partition or a volume.
detail Display information about the selected disk.
diskcomp Compare the contents of two floppy disks.
diskcopy Copy content of the disk.
diskpart Manage computer disks and drives.
diskperf Start or stop disk performance counters for Performance Monitor.
extend Extend a partition or a volume.
format Format a disk to accept Windows files.
freedisk Before proceeding with an installation process, verify that the required amount of disk space is available to ensure a smooth and successful installation.
fsutil Perform tasks that related to FAT and NTFS file systems.
gpt Assign gpt attribute(s) to a partition.
label Create, change, or delete the volume label of a disk.
list Display a list of disks.
recover Recover readable information from a bad or defective disk.
vol Display the disk volume label and serial number.

Network Commands

arp Display and modify entries in the ARP cache.
bitsadmin Create, download or upload jobs and monitor their progress.
dnscmd Manage DNS servers.
ftp Connect to and use FTP.
getmac Return the MAC address.
ipconfig IP configuration.
ipxroute The command used to display and modify information about the routing tables used by the IPX protocol is `route -n` or `ipx route`. This command allows you to view the current routing table, add new routes, delete existing routes, and modify the metrics and interfaces associated with each route.
irftp Sends files over an infrared link.
jetpack Compact a WINS or DHCP database.
netsh Network Shell utility.
netstat Display network statistics.
net use Connect/disconnect a computer to/from a shared resource
ping To view the computer name and the IP address of an endpoint computer, you can use the command prompt or PowerShell in Windows. In the command prompt, type `ipconfig /all` and press Enter.
tracert To determine the route to a destination, you can use the traceroute command, which sends ICMP packets to the destination and measures the time it takes for each hop along the way. This allows you to visualize the path that data packets take to reach the destination, and identify any potential bottlenecks or issues along the route.

System Information & Configuration Commands

date Display or set the system date.
driverquery Display device driver status and properties.
hostname Display the computer hostname.
powercfg Power configuration.
shutdown Turn off computer.
systeminfo Display computer system information.
time Display or set the system time.
ver Display Windows system version number.

Command Line Setup Commands

cls Clear the command prompt window.
cmd Start a new instance of the command interpreter.
color To change the foreground and background colors in the Command Prompt window for the current session, you can use the `color` command. The basic syntax is `color [number]`, where [number] is a value between 0 and 15 that corresponds to a specific color combination.
exit Quit and close the command prompt.
help Display a list of the available commands.
prompt Change the Cmd.exe command prompt.
title Set the Cmd.exe window title.

Conclusion

The Windows command line can be a valuable tool for any user, offering a range of functionalities that can enhance the overall Windows experience. For those looking to learn more about using commands, a Windows command line cheat sheet is a useful resource, providing a concise guide for both beginners and experienced users.

Related Articles


Is this information helpful?     

What can we do to improve this information? (Optional)
Refresh Please enter the verification code!