# Windows CMD Commands Cheat Sheet

If you often find yourself forgetting Windows CMD commands, you're not alone. The Command Prompt remains a powerful tool for managing files, processes, disks, networks, and system settings — but remembering all the right commands can be tricky. That’s why having a handy cheat sheet can be a real lifesaver, whether you store it on your desktop or print it out. In this article, you'll find a curated list of essential and frequently used CMD commands to help you get tasks done faster. It’s not exhaustive, but it covers the basics.

## Files and Folders Management

- **COPY** \- Copies files to another location
- **DIR** – Displays files and folders in current directory
- **DEL or ERASE** \- Deletes files
- **EDIT** \- Starts file editor
- **CD** \- Changes directory
- **EXPAND** \- Decompresses compressed files
- **FC** \- Compares files and shows the differences between them
- **FIND** \- Finds a text string in the file
- **MD or MAKEDIR** \- Creates a folder
- **MOVE** \- Moves files from one folder to another
- **PRINT** \- Prints out the text file contents
- **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 (overwrite)
- **ROBOCOPY** \- Uses an advanced tool to copy files and directories
- **TREE** \- Shows 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

## Applications and Processes

- **SCHTASKS** \- Executes a command or start a scheduled application (Task Scheduler)
- **SHUTDOWN** \- Shutdowns or reboots your computer
- **TASKLIST** \- Lists the tasks being performed
- **TASKKILL** \- Stops or halts a task (to stop a task you use a PID which you can find out from TASKLIST)
- **REG** – Starts registry editor
- **RUNAS** \- Launches the task as another user

## Disks Management

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

## System Information

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

## Network

- **IPCONFIG** \- Shows information about network interfaces
- **PING** – Sends ICMP requests to the target host, checks host availability
- **TRACERT** \- Finds the path for packets traveling over the network
- **NSLOOKUP** \- Finds IP address by resource name
- **ROUTE** \- Displays network route tables
- **ARP** \- Shows a table with IP addresses converted into physical addresses
- **NETSH** – Starts is a network settings control program
- **GETMAC** \- Shows the MAC address of the network adapter
- **TFTP** – Starts TFTP client in console

## Command Line Setup

- **CLS** \- Clears screen
- **CMD** \- Displays another command prompt
- **COLOR** \- Sets the text and background color
- **PROMPT** \- Changes the command line prompt
- **TITLE** \- Assigns a title for the current session
- **HELP** – Launches CMD help
- **EXIT** \- Exits the command line

## FAQ: Frequently Asked Questions About CMD Commands

1. **Do I need to run CMD as an administrator for these commands?**
   
   Some commands — especially those related to disk management (like DISKPART, FORMAT, CHKDSK) or system settings (GPUPDATE, REG) — require administrative privileges. If a command doesn't work, try launching the Command Prompt as an administrator.

2. **Do these commands work in all versions of Windows?**
   
   Most of them are supported in Windows 10 and 11, as well as in older versions like Windows 7 and 8. However, some tools like ROBOCOPY or OPENFILES might be unavailable or limited in earlier versions.

3. **How can I check a command's syntax or get help?**
   
   You can type the command followed by /h or /? in the command line — for example: xcopy /?. This will show you help information including options and usage examples.

4. **Can I undo a command once it’s executed?**
   
   Most CMD commands execute without an undo option. Be especially careful with destructive commands like DEL, RD, or FORMAT, as they can lead to data loss. Always double-check paths and parameters before running them.
