News
3 new Serverspace GPT API Language Models available now!
DF
August 2 2021
Updated April 8 2025

Windows CMD Commands Cheat Sheet

Windows

Using another OS?

Select the desired version or distribution.

Sometimes it’s easy to forget the most commonly used command line commands in Windows. Keeping a cheat sheet on your computer or written down on paper can help you quickly reference these commands when needed. While this list is not exhaustive, it includes the most essential and frequently used commands. Feel free to add your own commonly used commands in the comments below and share the list with others.

Files and Folders Management

One of the most common tasks users perform on their PC is managing files and folders. Whether you're moving files, deleting unnecessary ones, or organizing your directory structure, these commands can make your life much easier. With just a few keystrokes, you can perform operations like copying files, renaming folders, and even comparing file contents.

  • COPY – Copies files to another location.
  • DIR – Displays files and folders in the current directory.
  • DEL or ERASE – Deletes files.
  • EDIT – Starts the file editor.
  • CD – Changes directory.
  • EXPAND – Decompresses compressed files.
  • FC – Compares files and shows the differences between them.
  • FIND – Finds a text string in a file.
  • MD or MAKEDIR – Creates a new folder.
  • MOVE – Moves files from one folder to another.
  • PRINT – Prints out the contents of a text file.
  • RD or RMDIR – Deletes a folder.
  • REN or RENAME – Renames a file or folder.
  • REPLACE – Replaces files in one directory with files of the same name in another directory (overwrites).
  • ROBOCOPY – Uses an advanced tool to copy files and directories.
  • TREE – Displays the directory structure of a disk or folder.
  • TYPE – Displays the contents of text files.
  • OPENFILES – Manages opened local or network files.
  • XCOPY – Copies files and directory trees, often used for more complex copy operations.

Applications and Processes

Managing applications and processes is essential for keeping your computer running smoothly. You might need to schedule tasks, stop unnecessary processes, or execute commands under different user privileges. These commands will help you monitor and control applications and processes with ease, allowing for greater system efficiency.

  • SCHTASKS – Executes a command or starts a scheduled application (Task Scheduler).
  • SHUTDOWN – Shuts down or reboots your computer.
  • TASKLIST – Lists the tasks being performed on your computer.
  • TASKKILL – Stops or halts a task (requires the Task ID or PID, which can be found with TASKLIST).
  • REG – Starts the registry editor.
  • RUNAS – Launches a task as another user.

Disks Management

Disk management is crucial for maintaining your system's storage. Whether you're checking the health of a drive, formatting partitions, or recovering data, these commands give you the tools to keep your disks running efficiently. They can also help in cases where you need to configure or troubleshoot disk-related issues.

  • CHKDISK – Checks disk integrity and shows statistics.
  • DEFRAG – Starts disk defragmentation.
  • CHKNTFS – Displays or changes execution of disk check at boot.
  • COMPACT – Displays and changes the compression of files in NTFS partitions.
  • CONVERT – Converts FAT disk volume to NTFS.
  • DISKPART – Displays and adjusts disk partition properties.
  • FORMAT – Formats a disk or partition.
  • FSUTIL – Displays and configures file system properties.
  • LABEL – Creates, changes, or deletes a disk volume label.
  • RECOVER – Recovers data from a damaged or bad disk.
  • VOL – Displays the volume label and serial number of the disk.

System Information

Having access to system information is essential for troubleshooting and optimizing your computer. Whether you need to view hardware details, check software configurations, or monitor system updates, these commands provide a comprehensive overview of your system's current state. They allow you to gather important data for maintenance or diagnosis.

  • DATE – Outputs or sets the current date.
  • TIME – Displays or sets the system time.
  • DRIVERQUERY – Displays the current state and properties of device drivers.
  • HOSTNAME – Displays the name of the computer.
  • SYSTEMINFO – Shows configuration information about your computer.
  • VER – Allows you to view the Windows version.
  • GPRESULT – Displays the currently applied group policies (RSoP).
  • GPUPDATE – Updates group policies.

Network Management

When it comes to networking, having the ability to diagnose issues, configure network interfaces, and view IP configurations is essential. Whether you're troubleshooting connectivity problems, viewing network routes, or checking IP configurations, these commands are invaluable for maintaining and managing network settings on your system.

  • IPCONFIG – Shows information about network interfaces and IP configuration.
  • PING – Sends ICMP requests to the target host to check its availability.
  • TRACERT – Finds the network path for packets traveling to a destination.
  • NSLOOKUP – Finds the IP address for a resource name.
  • ROUTE – Displays network route tables.
  • ARP – Displays a table with IP addresses converted into physical (MAC) addresses.
  • NETSH – Starts the network settings control program.
  • GETMAC – Displays the MAC address of the network adapter.
  • TFTP – Starts the TFTP client in the command prompt.

Command Line Setup

Setting up your command line environment can help you work more efficiently. From customizing the prompt to clearing the screen, these commands allow you to tailor your experience and quickly adjust the settings of your command prompt interface. It's all about improving your workflow and having a clean and productive session.

  • CLS – Clears the screen.
  • CMD – Opens another command prompt window.
  • COLOR – Sets the text and background color in the command prompt.
  • PROMPT – Changes the command line prompt.
  • TITLE – Assigns a title to the current command prompt session.
  • HELP – Launches the CMD help interface.
  • EXIT – Exits the command prompt.

FAQ (Frequently Asked Questions)

1. How do I create a backup of my important files using CMD?

To create a backup, use the XCOPY or ROBOCOPY commands. Example:

ROBOCOPY C:\important_files D:\backup\important_files /E

This will copy all files from C:\important_files to D:\backup\important_files, including subdirectories.

2. How can I check my network connectivity?

Use the PING command to check connectivity with a remote server or IP address:

PING google.com

This will send ICMP requests to google.com to verify if it's reachable.

3. What is the difference between DEL and ERASE commands?

Both DEL and ERASE are used to delete files, and they work identically. You can use either command to remove unwanted files from your system.

4. How can I recover files from a corrupted disk?

Use the RECOVER command to try and recover lost or corrupted files from a disk. Example:

RECOVER D:\ /F

This command attempts to recover data from the D: drive.

5. How can I identify network problems in Windows?

Use the TRACERT command to trace the route packets take to a destination and identify where network issues might arise:

TRACERT google.com

Conclusion

This cheat sheet offers a quick reference guide to the most commonly used command line commands in Windows. Whether you're managing files, processes, disks, or networking, these commands help streamline your daily tasks. Don’t hesitate to experiment and expand your list of commands. Share your own tips and tricks in the comments to help others improve their command-line knowledge!

Vote:
4 out of 5
Аverage rating : 4.4
Rated by: 27
1101 CT Amsterdam The Netherlands, Herikerbergweg 292
+31 20 262-58-98
700 300
ITGLOBAL.COM NL
700 300

You might also like...

We use cookies to make your experience on the Serverspace better. By continuing to browse our website, you agree to our
Use of Cookies and Privacy Policy.