blog posts

CMD Commands

CMD Commands: The Most Important And Useful

This article will teach you the essential and valuable Windows command line CMD Commands in different sections.

Command Prompt, abbreviated as CMD, is a command-line interpreter program that executes commands using expressions and letters.

These commands automate tasks through scripts and batch files, perform advanced administrative functions, and troubleshoot or resolve specific Windows problems.

Command prompt or Command lCommandWindows provides access to more than 280 types of commands. These commands use the command line interpreter instead of the Windows graphical interface to perform some operating system tasks.

They allow you to copy data to another folder, format the entire disk, back up your files, send messages to other computers, or restart your computer.

These are some of the easiest things to do with CMD. Many tasks and commands can only be executed in this environment. Below is a comprehensive list of the most essential and valuable CMD commands available in Windows 7 to 11, Vista, and XP.

How to access CMD

There are several ways to open CMD:

  • The most common way to run it is through the Command Prompt shortcut in the Start menu. You can also find it by typing CMD in the start bar.
  • Another way to access the command prompt is to press (Windows + R) Run and type the CMD command. Alternatively, you can open cmd.exe from its original location at C: Windowssystem32cmd.exe.
  • Another way to open the Command Prompt in some versions of Windows is through the Power User menu (WIN+X). However, depending on how your computer is set up, you may see PowerShell instead of Command Prompt.

Remember to execute many commands in the command prompt only if you have completed it as an administrator (Run as Administrator).

List of the most essential and valuable CMD commands

Below is a list of necessary and proper controls, some of which work immediately, some only in certain situations, and most only if you add more text or commands afterward.

If a particular command doesn’t execute immediately, read the command prompt’s error carefully or do further investigation for your specific application. For example,? / del or search the Internet for that command command syntax. To see examples of using each commaCommand Command space after typing it and inserting” ?/ “.

order

Function

HelpShowing basic CInternetnds and instructions on how each order works
assocView and edit file extensions (you can specify which program to use to open which files)
bitsadminCreate download or upload tasks and monitor their progress
callCalling a batch program from another without stopping the running batch program. This Command command labels as the call target
cmdStarts a new instance of the command prompt. If used without parameters, it displays the version and copyright information of the operating system
compCompare the contents of two or more sets of files
compactShow or change file compression on NTFS drives
CHDIR or CDDisplay the name or change the current directory
CipherShow or change the encryption of directories and files on NTFS drives. If used without parameters, cipher displays the encryption status of the current directory and any files in it
clipRedirect command output from the command line to the Windows clipboard. You can use this Command tCommanddata directly in any program that receives text from the clipboard. Also, you can paste this text output into other programs.
ChkdskChecking the disk and displaying a report of its status
chantsShow or change the automatic disk check when starting the computer. If used without options, chkntfs displays the file system of the specified volume
CLSClear the page
cmd keyCreates, lists, and deletes saved usernames and passwords or credentials
COLORChange the color and text of the CMD environment
CopyCopies one or more files to another location
FTP debugChange the status of the Debugging mode. This mode is off by default. If it’s on, you’ll see a < sign before every Command command on the remote computer
diskcompCompare the content of two discs
diskcopyCopying the contents of one disk to another
DiskpartIt helps you manage computer drives (disks, partitions, volumes, or virtual drives)
DoskeyIt allows a user to call previously used commands, edit them, and create macros
DateDisplay and adjust the date
dirDisplay a list of files and subdirectories in a directory
echoDisplay messages or turn command commands on or off. If used without parameters, it displays the current echo settings
even createCreating a custom event in a specific event report for the admin
del or EraseDelete one or more files
ExitExit the command line
execThis command command restores data as part of a backup or restore sequence. Run the script file on the local computer. If the script fails, an error is returned, and DiskShadow terminates.
ExpandExpand one or more compressed files. You can use this Command tCommander compressed files.
FCCompare one or more separate files and display the differences
FindSearch for a text string in one or more files
FormatFormat the disk for use with Windows
gpfixupAfter the domain name change, the operation resolves domain name dependencies in Group Policy Objects and its links. To use this Command, Commandt installs Group Policy Management as a feature through Server Manager
gpupdateUpdate Group Policy settings
hostnameDisplay hostname
labelCreate, change, or delete a drive’s label (name). If used without parameters, it changes the current industry or removes an existing label
logoffSign out of your Windows account
MD or MKDIRCreate directory
MOVEMoving one or more files from one directory to another directory
modeIt displays system status and changes system settings or reconfigures ports or devices. If used without parameters, the mode displays all available console controllable properties and COM devices.
msiexecProvides a tool to install, modify, and perform operations on Windows Installer from the command line
msinfo32Open the System Information tool to view the local computer’s hardware, system components, and software environment comprehensively.
open filesIt helps the admin to display queries or disconnect files and directories opened in the system. This Command aCommandbles or disables the Maintain Objects List system global flag
PRINTPrint text file
pauseSuspends the batch program processing and displays the “… Press any key to continue ” prompt
pushdSave the current directory and then change it
popdChanges the current directory to the directory most recently saved with the pushd Command
RDDelete directory
rdpsignDigital signature with remote desktop protocol file (rdp.)
recoverRecover readable data from a damaged or defective disk
ReFSUtilis a tool included with Windows and Windows Server that attempts to detect severely damaged ReFS volumes, identify the remaining files, and copy those files to another volume
REN or RENAMEThey are renaming one or more files. Directory and drive names cannot be changed with this ComCommand
ommandReplace files
RMDIRDelete directory
ROBOCOPYAdvanced features for copying files and directory tree
schtasksAdds and removes commands and programs to run periodically or at a specific time and tasks from the program. It also starts and stops tasks on demand and displays and changes scheduled tasks
retiresConfigures and analyzes system security by comparing your current configuration with specified security patterns.
SFCIt scans and verifies all protected system files and replaces incorrect versions with correct ones
serverweroptinAllows you to turn on error reporting
shiftChanges the position of batch parameters in the batch file
SHUTDOWNTurn off the computer
SysteminfoIt Displays detailed configuration information about a computer and its operating system, including functional system configuration, security information, product ID, and hardware characteristics (such as RAM, disk space, and network cards).
takeownIt helps the admin restore previously denied access to the file and makes the admin the file owner. This Command is commCommanded in batch files.
TASKKILLTerminate all running processes and services
TASKLISTDisplay a list of all running processes, including services
timeDisplays or sets the system time. If used without parameters, it displays the current system time and prompts you to enter a new time
titleCreates a title for the command prompt window
treeGraphically displays the directory structure of a path or disk in a drive. The form displayed with this command command is based on the parameters you specify on the command line. If you do not specify a purpose or path, this comma command commands a tree structure starting with the current directory of the campaign.
type perfIt writes performance data in the command window or a log file. It would help if you pressed CTRL+C to stop
tzutilDisplays the Windows Time Zone tool
VERDisplays the operating system version number
verifyTells the cCommandcommando whether your files were written correctly to the drive.
volThe label shows the volume of the drive and the serial number, if any. If used without parameters, it displays current drive information
wbadminBackup and restore of the operating system, volumes, files, folders, and programs via the command line
on WestIt is a command line tool used to manage the Windows Deployment Services server
webutilAllows you to retrieve information about reporting events and publishers. You can also use this Command command to remove event manifests, run queries, and export, archive, and purge logs.
whereDisplays the location of files that match the given search pattern
whoamiDisplays the user and group information and privileges of the user currently logged in to the local system. If used without parameters, it shows the current domain and username
winesWindows Remote Management allows you to manage and run programs remotely
winsat mfmediMeasures video decoding (playback) performance using the Media Foundation framework
scriptWindows Script Host provides an environment where users can run scripts in different languages ​​that use other object models to perform tasks.
XcopyCopies files and directories, including subdirectories

Necessary CMD commands in the network discussion

order

Function

PINGChecking the connection to the Internet or the desired network
IPCONFIGIt shows the information on the internet networks available on the system and their details. The most important information from this Command is the iCommandPv4 address and Default Gateway details of the wireless network adapter and the Ethernet network adapter.
TRACERTTroubleshooting possible network problems by sending packets and trying to connect to the intended destination
GETMACDisplay MAC addresses for system network adapters
NSLOOKUPFind domain-specific IP address
NETSTATIt displays general statistics, troubleshooting, and network analysis. It shows the active connections in the system, such as LAN, within the network or link on the Internet and covers the port information completely.
NETSHView all networkingInternetons and fine-tune network adapters in the system. Running this Command commanding CMD to Network Shell mode
pathpingProviding information about network delay and information about sending and losing packets through the network
pktmonIt is a cross-component and in-box network diagnostic tool for Windows that detects lost and received packets and filters and counts boxes.
qappsrvDisplay a list of all remote desktop session hosting servers on the network.

***

We hope this article was helpful to you. What is the most used CMD command for you? Which controls do you use that are not mentioned in this article?