Windows Command Prompt Cheat Sheet: Navigating Windows Like a Pro

6 min read

The Windows command line is a strong tool that may be used for various activities. Moreover, the command line will assist you in almost everything, from fundamental operations like managing files and directories to more sophisticated ones like scripting and digitization. However, this blog will walk you through how to launch the terminal commands in Windows and give you a Windows command prompt cheat sheet.

Sometimes, you fail to recall CMD commands on Microsoft Windows, so having them on your computer or a paper as a cheat sheet is clever. This Windows command line cheat sheet is not exhaustive but includes the most regularly used commands. Feel free to add your most frequently executed commands in the comment box below and share the list.

Continue exploring to have a clear idea of the CMD cheat sheet that will help you understand basic commands.

What is the Windows Command Line?

The Windows command line is a written interface that lets you run commands on your system. Moreover, the command line (CMD), sometimes recognized as the “command prompt” or simply “prompt,” is a text-based edge used to issue, generate, or execute commands and manage your computer. However, the command line may be employed for various resolutions, including running apps and retrieving system settings. While the command line might initially seem scary, it is relatively simple. Moreover, with a little effort, you can rapidly learn how to utilize the command line feature of Windows to operate your computer more effectively.

Additionally, the Microsoft Windows commands prompt is the command-line terminal for Microsoft Windows PCs, similar to the Terminal in Unix & Linux. It emulates several command-line structures or features from Microsoft’s defunct text-only computer operating systems, like MS-DOS (although it is not MS-DOS).

Also Read: PowerShell Vs CMD (Command Prompt): What is Key Difference?

Windows Command Prompt Cheat Sheet

Sometimes, you forget to use the CMD commands on Microsoft Windows, so keeping them on your computer system or a scrap of paper as a cheat sheet is smart. This Windows CMD commands cheat sheet is not exhaustive but includes the most regularly used commands. Here is the list of the most common command prompt cheat sheet you must have at your fingertips.

Directory Navigation

Directory Navigation

Below is the Windows Command Prompt Cheat Sheet list, which allows you to examine and move folders around.

COMMAND EXPLANATION
c:

 

Change the current drive to C:\ drive.
d:

 

Change the current drive to D:\ drive.
CD c:\path\to\my_folder

 

Change directory to C:\path\to\my_folder.
CD ..

 

Navigate to the leading directory of your current working directory.
CD .\new_folder

 

Navigate towards the folder new_folder located within the current working directory.
CD /D d:\videos\

 

Change your present drive to D:\ and open the videos folder.
DIR Display the files and manuals in the current directory.
DIR /A c:\apps\ Display files and directories in the path c:\apps\
DIR /A:D Show just folders (D: directories).
DIR /A:-D Display just files (D: directories, -: not)
DIR /A: H View hidden files and folders.
DIR /O Show files and folders organized alphabetically.
DIR /O:S Show files and folders organized by file size, smallest to largest.
DIR /O:-S Show files and folders organized by file size, from most significant to most minor.
DIR /B Show just the names of the folders and files in the current working directory.
SORT Obtain input from an input file/pipeline, sort the data alphabetically (default: A to Z; reverse: Z to A), and then show the output.
SORT “C:\music\playlist.m3u” Sort the contents of C:\Music\Playlist.m3u. Line by line.
MOVE Transfer one or more files.
MOVE c:\f1\text.txt c:\f2

 

Transfer the file text.txt from c:\f1 to c:\f2.
MD new_folderMAKEDIR new_folder

 

Create a new folder termed new_folder in the present directory.
RD new_folderRMDIR new_folder Delete the folder named new_folder in the present directory.
TREE Show the root directory layout of a disk or folder.
TREE “C:\Program Files” Show the file and directory layout of the “Program Files” folder on the drive C:\.
TREE C:\ /F Show the names of the files in each binder in the directory structure of the C:\ drive.
ATTRIB Show/set the characteristics of the files in the current directory.
ATTRIB +H +S +R Hide a file/folder myItem
ATTRIB -H -S -R Unhide a file/folder myItem

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

File Management

File Management

The following Windows Command Prompt Cheat Sheet serves to manage and manipulate files.

CMD, like Unix, offers pipelines; you can send the output of one command to the next by enclosing the pipe character “|” between them.

COMMAND EXPLANATION
assoc Fix the file associations.

 

Attrib

 

Change the file characteristics.
cd (or chdir) Change the current working directory.
comp Make a comparison of several files.
compact Transfer files from one place to another.
del (or erase) Delete files.
dir List the files and subfolders.
expand Expand compressed files.
fc File comparison.
find Filter a set of characters in files.
findstr Look for patterns of text in files.
md (or mkdir)

 

Create a directory or subfolder.
Move

 

Transfer files from one directory to another.
Openfiles Display the current list of open files and folders or detach them.
Print

 

Send a text file to the printer.
rd (or rmdir)

 

Delete a directory.
ren (or rename) Rename a file or directories.
replace Replace existing or create new files in a directory.
robocopy Copy files from one area to another.
tree Show the tree topology of a directory.
type Show the contents of a text file.
xcopy Copy the files and folders.

Disk Management

Disk Management

Below is the Windows Command Prompt Cheat Sheet table that is easy to handle and execute employing cmd.

COMMAND EXPLANATION
CHKDSK Check and fix disk issues. (Local disks only)
CHKDSK /F A: Fix problems on the A: drive.
CHKDSK /R A: Recover data from A: drive
CHKDSK /X A: Dismount disk A. Encrypt the classified folder.
CIPHER /E classified Decode the file secret_recipe.txt.
CIPHER /Dsecret_recipe.txt Disk Defragmentation
DEFRAG Display/modify disk-checking during startup.
CHKNTFS Display/change the size reduction of files in NTFS volumes.
COMPACT Convert FAT disk volumes to NTFS.
CONVERT Display and change disk partition properties.
DISKPART Format the disk.
FORMAT File system management
FSUTIL

 

Rename the disk. D:\ to X:\
LABEL d:x

 

Assign drive P:\ to the local folder. c:\taxes
SUBST p: c:\taxes Remove the route P:\
SUBST p: /D Retrieve a file data.dat from a corrupt or damaged disk D:\
RECOVER d:\data.dat Display the current disk volume identifier and serial number.
VOL Control the power settings and establish Hibernate/Standby modes.
POWERCFG Scan and update the protected system files.
SFC /SCANNOW Check and fix disk issues. (Local disks only)

Also Read: 400+ Linux Basic Commands You Should Know

System Information and Networking

System Information and Networking

The following Windows Command Prompt Cheat Sheet list helps troubleshoot computers and networks.

COMMAND EXPLANATION
arp Display and change ARP cache entries.
bitsadmin Create, download, or transmit jobs and track their progress.
dnscmd Manage the DNS servers.
ftp Connect and utilize FTP.
getmac Retrieve the MAC address.
ipconfig IP setup.
ipxroute Display and change information about the IPX protocol’s routing tables.
irftp Sends files over the infrared connection and stores a WINS or DHCP database.
jetpack The Network Shell utility.
netsh Display network stats.
netstat Connect or detach a machine from a shared resource.
net use View the name and IP address of an endpoint machine.
ping Delivering ICMP packets to a destination helps to determine the path to it.
tracert Display and change ARP cache entries.

Conclusion

While this is an unpopular stance, the command line is far more effective than a GUI. Better still, it is not limited to seasoned or expert users. It’s quite the opposite. The Windows prompt is equally suited for newbies because it is time-saving and straightforward.

We hope our Windows Command Prompt Cheat Sheet will assist you in completing your work quickly and efficiently today, particularly if you have previously mistaken Windows command-line commands with different console programming languages. Comment below for more commands you know. We will surely add them in our next blog.

FAQs (Frequently Asked Questions)

Q#1 How Do I Use Windows Command Prompt?

You may also launch the run box by pressing ‘Win + R’ simultaneously, then typing ‘cmd’ and pressing ‘Enter’. Another alternative is to hit ‘Win + R’ or right-click your Start button, then pick ‘Command Prompt’ from the drop-down list that opens.

Q#2 What Is The Shortcut Key For Command Prompt?

One of the simplest methods to enter Command Prompt in Windows 11 & 10 is through the Run window. Hold down the ‘Win + R’ keys on your device’s keyboard, then enter ‘cmd’ and hit Enter or OK.

Q#3 How Do I Run Command Prompt As Administrator?

To run the command prompt as admin, open a run-box, input ‘cmd,’ and then press ‘Control+Shift+Enter to open the CMD or command prompt as an administrator.

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 Today

Choose one of your required Web Hosting Plan at market competitive prices

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