Windows Command Prompt Cheat Sheet: Basic To Advanced Commands

8 min read

You’re not the only one who frequently forgets Windows CMD commands. Although it might be challenging to remember all the correct commands, the Command Prompt is still a useful tool for controlling files, programs, storage, networks, and system settings. Because of this, having a handy Windows Command Prompt Cheat Sheet—whether you print it off or save it to your desktop—can be a huge help.

It’s smart to have CMD commands on your computer or paper as a CMD commands cheat sheet since sometimes you forget them when using Microsoft Windows. The most frequently used commands are included in this Windows 11 command prompt cheat sheet, although it is not comprehensive. However, keep a copy of this command prompt commands cheat sheet on your working desk, in your pocket, or with you at all times.

Keep reading and exploring to learn the best Windows CMD commands cheat sheet you can ever get in 2025.

Windows Command Prompt Cheat Sheet

What is the Windows Command Line?

You may run commands on your machine using the textual interface known as the Windows command line. Additionally, the command line (CMD), sometimes known as the “command prompt” or just “prompt,” is a text-based tool for managing your computer and is used to issue, produce, or execute instructions. Nonetheless, the command line may be used for several fixes, such as launching applications and obtaining system preferences. Although it may appear intimidating at first, using the command line is actually rather easy. Furthermore, you may quickly learn how to use Windows’ command line functions to run your computer more efficiently with a little work.

Additionally, the command-line terminal for Microsoft Windows PCs is the Microsoft Windows commands prompt, which is comparable to the Terminal in Unix and Linux. Although it is not MS-DOS, it mimics a number of command-line structures and features from Microsoft’s now-defunct text-only computer operating systems. Now, we will talk about some of the useful Windows command prompt cheat sheet you will need in your daily use.

The Best Windows Command Prompt Cheat Sheet in 2025

Here is the best Windows commands cheat sheet you can ever get in 2025:

Directory Navigation

You may inspect and move directories with the use of this command line cheat sheet Windows.

Commands Explanation
c: Change the present drive to the C:\ drive.
d: Change the existing drive to the D:\ drive.
CD c:\path\to\my_folder To change directory to c:\path\to\my_folder
CD.. To navigate to the parent directory of the existing working directory file.
CD .\new_folder To navigate to the folder new_folder located in the existing working directory.
CD /D d:\videos\ Change the present drive to D:\ and access the folder videos on it.
DIR Display files and folders in the existing directory
DIR /A c:\apps\ Display files & folders in the directory c:\apps\
DIR /A:D Display only folders (D: directories)
DIR /A:-D Display only files (D: directories; -: not)
DIR /A:H Display hidden files & folders
DIR /O Display files & folders sorted alphabetically.
DIR /O:S Display files & folders sorted by file size from least to largest.
DIR /O:-S Display files and folders organized by file size from largest to smallest
DIR /B Display only the names of files & folders in the present working directory file
SORT Take data from a source file/pipeline, sort its insides alphabetically (defaulting: A to Z and vice versa), and display the output.
SORT “C:\music\playlist.m3u” To sort the contents of C:\music\playlist.m3u line by line.
MOVE To move a file or files.
MOVE c:\f1\text.txt c:\f2 Move the file text.txt from a folder c:\f1 to another folder c:\f2
MD new_folderMAKEDIR new_folder To create a new folder called new_folder in the existing directory.
RD new_folderRMDIR new_folder To delete the folder called new_folder in the existing directory.
TREE Show the directory building of a disk/folder.
TREE “C:\Program Files” Show the directory construction of the folder “Program Files” on the disk C:\
TREE C:\ /F Display the names of the records in each folder in the file directory structure of the C:\ drive.
ATTRIB Display/set the characteristics of the files in the current directory
ATTRIB +H +S +R myItem Hide a file/folder myItem

Also Read: 400+ Linux Basic Commands You Should Know

File Management

The command line cheat sheet listed below is used to manage and work with files.

Unleash Peak Performance

With Dedicated Servers


Your Own Server, Your Own Rules!

However, similar to Unix, CMD allows pipelines. By placing the pipe character “|” between two commands, you may send the output of one to the next. Moreover, here is the File Management Windows Command Prompt Cheat Sheet:

Commands Explanation
COPY text.txt C:\schoolwork To copy the file text.txt to a folder with the path C:\schoolwork.
DEL text.txtERASE text.txt Delete the file text.txt
REN text.txt script.batRENAME text.txt script.bat Rename the file text.txt to script.bat
REPLACE .\src\hey.txt .\dest To overwrite; replace a file named hello.txt in a local folder src with an additional hello.txt in a local folder dest, both files allocating the same name.
Warning: Don’t postulate .\dest\hey.txt anywhere here.
XCOPY Copy files and directory trees to an alternative folder.
XCOPY is similar to COPY, but with extra switches to specify the source and end point paths in detail.
XCOPY /S folder1 folder2 Copy folders & subfolders of folder1 to folder2
ROBOCOPY Robust copying of files & directories: by default, such copying only happens if the source and endpoint differ in time stamps or file sizes.
EXPAND gameData.cab Decompresses the compressed .CAB filing cabinet file, gameData.cab
FC file1.ext file2.ext Compare the contents of 2 files (file1.ext, file2.ext) and display non-matching lines
COMP file1.ext file2.ext Compare the contents of 2 files (file1.ext, file2.ext) and display non-matching items
FIND “python” in run.bat Output every line that covers a text string (which you must encircle in quotation marks) “python” in the file run.bat
FIND /C “python” in run.bat Count every line that covers a text string (which you must encircle in quotation marks) “python” in the file run.bat
PRINT resume.txt Print the contents of the file resume.txt
OPENFILES /QUERY Query/display open files
OPENFILES /DISCONNECT Disconnect files unlocked by network users.
TYPE test.txt It displays the contents of the file test.txt type
TYPE playlist.m3u SORT /unique /o C:\work\unique_play.m3u It sorts a file playlist.m3u and output only the exclusive values to a file C:\work\unique_play.m3u
MORE Display the contents of one or more files, one display screen at a time.
ASSOC Display or change the connotation between a file extension and a file type
NOTEPAD Open the Notepad app from the CMD.

Also Read: Docker Commands Cheat Sheet: Mastering Your Ultimate Cheat Sheet

Disk Management

The following Windows Command Prompt Cheat Sheet is simple to complete and may be automated on CMD.

Commands Explanation
CHKDSK Check & repair disk problems (local disks only)
CHKDSK /F A: To fix errors on A: drive.
CHKDSK /R A: To recover data on A: drive.
CHKDSK /X A: Dismount drive A:
CIPHER /E classified To encrypt the folder: classified.
CIPHER /D secret_recipe.txt To decrypt the file secret_recipe.txt
DEFRAG For Disk Defragmentation
CHKNTFS Display/modify disk-checking on startup
COMPACT Display/change the density of files in NTFS partitions
CONVERT Convert the FAT disk volume to NTFS.
DISKPART Display and regulate disk partition properties
FORMAT To format the disk
FSUTIL For file system management
LABEL d:x To rename disk D:\ to X:\
SUBST p: c:\taxes To assign drive P:\ to the local folder C:\taxes
SUBST p: /D To remove the path represented by P:\
RECOVER d:\data.dat Recover the file data.dat from a bad or defective disk D:\
VOL Display the current disk volume tag and serial number.
POWERCFG Control power settings and organize Hibernate/Standby modes
SFC /SCANNOW Scan and bring up-to-date protected system files.

System Information and Networking

When troubleshooting computers and computer networks, the following Windows Command Prompt Cheat Sheet might become useful.

Commands Explanation
VER Display the current operating system version.
SYSTEMINFO List system configuration
HOSTNAME Show the computer’s hostname on the network.
DRIVERQUERY Show all installed device drivers.
DATE Display/set system date
TIME Display/set system time
GPRESULT Display the Resultant Set of Policy (RSoP) info for a remote user and computer.
GPUPDATE Update group policies
IPCONFIG Display Windows IP network configurations.
IPCONFIG /release Release your current local IP address.
IPCONFIG /renew Request a new local IP address.
IPCONFIG /flushdns Reset the contents of the DNS server client resolver cache.
PING google.com Send ICMP requirements to the target google.com and check the host availability.
PATHPING Trace route and deliver network latency and packet loss for individually router and link in the path
NET It provides various network services.
NET use M: \\gameServ /user: “ReadyPlayerOne” player1 It assigns as disk M:\ the path \\gameServ, logging in as “ReadyPlayerOne” and password “player1”
TRACERT To find the IP address of any remote host.
NSLOOKUP To find IP addresses on a nameserver.
ROUTE To manipulate network routing tables.
ROUTE PRINT Displays network route details
ARP -A List IP addresses and conforming physical addresses (Address Resolution Protocol)
NETSH Configure network boundaries, Windows firewall, routing, and remote access
NETSTAT Display current TCP/IP network links and protocol statistics
GETMAC Shows all the Apple MAC addresses of the network adapters

Process Management

The following Windows Command Prompt Cheat Sheet is similar to those in Task Manager. Keep in mind that variables are called in arithmetic or logical statements by surrounding them in two “%” marks, such as “%a%.”

Commands Explanation
SCHTASKS Create/edit a task on Task Scheduler. Use this to create arranged tasks in Disk Management.
SET List environment variables
PATH Display/change the list of folders kept in the %PATH% environment variable
SHUTDOWN /R To restart the computer
SHUTDOWN /S /T 60 To shut down the computer 60 seconds from now.
TASKLIST List running tasks
TASKLIST /SVC Show services related to each task
TASKLIST /V Display detailed task information.
TASKLIST | FIND “1234” Get the name of the executable related to the process ID (PID) of 1234
TASKKILL End one or more tasks.
TASKKILL /IM “msedge.exe” Terminate all Microsoft Edge instances:
TASKKILL /PID 10736 Terminate process with PID of 10736
REGREGEDIT Registry Editor
RUNAS /USER:user2 program1 Execute a program program1 as an alternative user user2
POWERSHELL Open a PowerShell instance.

Shortcut keys

Any Windows Command Prompt Cheat Sheet must include techniques to make your job go more quickly, like the following.

Commands Effect
Tab Autocomplete
Ctrl+F Find text in console (opens dialog box)
F1, F3, F5, F8 Retype command
F2 Copy the existing command leftward of the cursor.
F4 Delete the existing command rightward of the cursor.
F6 Insert end-of-file character
F7 List the preceding commands from which you choose
F9 Retype a command by entering its line number in the command History

Conclusion

We genuinely hope that our Windows Command Prompt Cheat Sheet will help you complete your job today swiftly and effectively, particularly if you have a history of misunderstanding Windows command prompt commands with other terminal scripting languages. You can also copy command in CMD prompt from our list and become a CMD pro in 2025.

Especially if you have previously been confused by the Windows command line cheat sheet Windows with other console programming languages, we hope that our Windows 11 command prompt cheat sheet will help you finish your work today swiftly and effectively.

FAQs (Frequently Asked Questions)

How Do I Get A List Of Command Prompts?

To get the best CMD prompts, you can get the Windows Command Prompt Cheat Sheet from this blog. In another way, you can follow these steps:

  • Type “help” into the Command Prompt window and hit Enter.
  • However, this will provide a list of the main commands and system tools that are accessible in the Command Prompt, along with a synopsis of each.

What Cool Things Can I Do In CMD?

  • Utilize the Command Prompt to Encrypt Files
  • Modify the Command Prompt Window’s Color
  • Alter the Command Prompt’s Prompt Text
  • Modify the Command Prompt Window’s Title
  • List all of the drivers that are installed on your Windows 10 computer.
  • In CMD, the keys F1 through F9 are shortcuts.
  • Utilize the Command Prompt to Hide Folders
  • Transfer the Command Output to the Clipboard

What Are The Basic Commands In CMD?

Typical commands for the Windows Command Prompt (CMD):

  • Dir: Provides a list of the current directory’s files and folders.
  • Cd: Changes the current directory.
  • Md: Establishes a fresh directory.
  • Rd: Removes (deletes) a directory.
  • Copy: Makes duplicate files.
  • Del: Removes data.
  • Ren: Modifies file names.
  • Type: Shows a text file’s contents.

How To Use CMD For Everything?

Another way to open the run box is to press Win + R at the same time, type cmd, and hit Enter. Moreover, enter the instructions now, and you can use the Windows CMD commands cheat sheet to accomplish anything.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Make Your Website Live!

Choose Your Desired Web Hosting Plan Now

Temok IT Services
© Copyright TEMOK 2025. All Rights Reserved.