Full List Of Windows CMD Commands You Need To Know | LearnFully

0
LearnFully


Command Prompt or CMD is a command line interpreter in the Windows family of operating systems created by Microsoft Corporation. In this article, we have tried to curate all list of Windows CMD Commands. The list includes both internal and external commands applicable to the command prompt.


In the case of Windows OS, most users are not even remotely concerned about the Command Prompt or cmd.exe. People know that there is some inbuilt software with a black screen which is used to troubleshoot Windows issues sometimes. For instance, when a user has to repair a corrupt pen drive. On the other hand, Linux users are very much familiar with the command line utility and it’s a part of their daily computer usage.

CMD is a command line interpreter – a program designed to understand the commands input by a user, from a text file, or any other medium – in Windows NT family. It is the modern version of the COMMAND.COM which was the default shell present in the DOS operating systems and as a command line interpreter in Windows 9x family.

Similar to Linux command line, the Command Prompt in Windows NT – Windows X, 7, 8, 8.1, 10 – is quite efficient. Using various commands, you can ask your Windows OS to perform desired tasks which you normally do by using the GUI.

How to open Windows CMD?

You can open the Windows Command Prompt by typing cmd in the Start Menu search bar. Alternatively, you can press CTRL+R to open the RUN utility, type cmd, and press Enter.

Are the Commands Case-Sensitive?

The commands used in the Windows Command Prompt are not case-sensitive, unlike the Linux command line. For example, when you type dir or DIR, it’s the same thing. But individual commands may have various options which can be case-sensitive.

Full List of Windows CMD Commands

Here is a full list of Windows CMD commands which will be beneficial to you. Once you get the hang of these commands, you can do most of your work more quickly without using the normal graphical interface.

To display help for the commands:

command_name /?

Press Enter.

For example, to see help for the ping command:

ping /?

Note: Some of these commands may require relevant service or Windows version to work correctly.
A – Windows CMD commands

 ADescription
addusersUsed to add and list users in a CSV file
admodcmdUsed for bulk modifying contents in an active directory
arpAddress Resolution Protocol is used to map IP address to the hardware address
assocUsed to change associations for file extensions
associatOne step file association
atRun a command at a specific time
atmadmDisplay connection info of the ATM adapter
attribUsed to change file attributes

B – Windows CMD Commands

 BDescription
bcdbootUsed to create and repair a system partition
bcdeditUsed to manage boot configuration data
bitsadminUsed to manage the Background Intelligent Transfer Service
bootcfgUsed to edit boot configuration in Windows
breakEnable/Disable break capability (CTRL+C) in CMD

C – Windows CMD Commands

 CDescription
caclsUsed to change permissions of files
callUsed one batch program to call another
certreqUsed to request a certificate from a certification authority
certutilManage Certification Authority files and services
cdUsed to change folder (directory) or go to a specific one
changeUsed to change terminal services
chcpDisplays the number of active console code page
chdirSame as cd command
chkdskUsed to check and repair issues in the disk
chkntfsUsed to check the NTFS file system
choiceAccept user input (via keyboard) to a batch file
cipherUsed to encrypt/decrypt files and folder
cleanmgrUsed clean temp files and recycle bin automatically
clipCopy result of any command (stdin) to Windows clipboard
clsClear CMD screen
cmdUsed to start a new CMD shell
cmdkeyUsed to manage stored usernames and passwords
cmstpUsed to install or remove a connection manager service profile
colorChange the color of the CMD shell using options
compCompare contents of two files or two sets of files
compactCompress files and folders on an NTFS partition
compressCompress one or more files
convertConvert a FAT partition to NTFS
copyCopy one or more files to another location
coreinfoShow the mapping between logical and physical processors
cprofileCleans specified profiles of wasted space and disabled user-specific file associations
cscmdConfigure offline files on a client computer
csvdeImport or Export the data of an active directory

D – Windows CMD Commands

 DDescription
dateUsed to display the date or change it.
defragUsed to defragment system hard drive.
delUsed to delete a file(s).
delprofUsed to delete user profile(s).
deltreeUsed to delete a folder and its sub-folders.
devconAccess the command line device manager utility.
dirUsed to display files and folders list.
dirquotaManage File Server Resource Manager quotas.
diruseUsed to display disk usage.
diskcompCompare contents of two floppy disks.
diskcopyCopy data of one floppy disk to another.
diskpartMake changes to partitions of storage, both internal and connected.
diskshadowAccess the Disk Shadow Copy Service.
diskuseView used space in folder(s).
doskeyUsed to edit command line, recall commands, and create macros.
driverqueryDisplay a list of installed device drivers.
dsaclsView and edit access control entries for objects in active directory.
dsaddUsed to add objects to active directory.
dsgetView objects in active directory.
dsqueryFind objects in an active directory.
dsmodUsed to modify objects in an active directory.
dsmoveRename or move an active directory object.
dsrmRemove objects from an active directory.
dsmgmtManage Active Directory Lightweight Directory Services

E – Windows CMD Commands

 EDescription
echoTurn command-echoing feature on/off, display a message on the screen.
endlocalEnd localization environment changes in a batch file.
eraseUsed to delete on or more file(s).
eventcreateAdd custom event to Windows event log (Admin rights required).
eventquerryDisplay list of events and their properties from event logs.
eventtriggersDisplay and configure event triggers on local and remote machines.
exitExit the command line (Quit current batch script).
expandUncompress one or more .CAB file(s)
explorerOpen Windows Explorer.
extractUncompress one or more Windows cabinet file(s)

F – Windows CMD Commands

 FDescription
fcUsed to compare two files.
findUsed to search a specified text string in a file.
findstrUsed to find string patterns in files.
fingerDisplay information about user(s) on a specified remote computer.
flattempUsed to enable/disable flat temporary folders.
ForRun a command in a loop for a file(s) for defined parameter.
forfilesUsed for batch processing of selected file(s)
formatUsed to format a disk.
freediskUsed to check free space on a disk.
fsutilFile system utility to manage file and drive properties.
ftpUse FTP service to transfer files from one PC to another.
ftypeDisplay/ Modify file extension type associations.

G – Windows CMD Commands

 GDescription
getmacUsed to display the MAC address of your network adapter.
gotoUsed to direct a batch program to a line identified by a label.
gpresultDisplay Group Policy Settings and Resultant Set of Policy for a user.
gpupdateUpdate local and active directory based on group policy settings.
graftablTurn on the ability to display an extended character in graphics mode.

H – Windows CMD Commands

 HDescription
helpDisplay a list of commands and see online information for them.
hostnameUsed to display hostname of the computer.

I – Windows CMD Commands

 IDescription
icaclsUsed to change permissions of files and folders.
iexpressUsed to create a self-extracting zip archive.
ifUsed for conditional processing in batch programs.
ifmemberDisplay the group(s) an active user belongs to.
inuseReplace the files which the OS is currently using (restart required).
ipconfigDisplay and change Windows IP configuration.
ipseccmdUsed to configure IP Security policies.
ipxrouteDisplay and modify routing table information used by IPX protocol.
irftpUsed to send files over an infrared link (infrared functionality required).

L – Windows CMD Commands

 LDescription
labelUsed to change the name of a disk.
lodctrUpdate registry values with latest performance counters.
logmanUsed to manage performance monitor logs.
logoffLog a user off.
logtimeAdd the date, time, and a message to a text file.
lpqDisplays print queue status.
lprUsed to send a file to a computer running the Line Printer Daemon service.

M – Windows CMD Commands

MDescription
macfileManage files server for Mackintosh.
makecabUsed to create .cab files.
mapisendUsed to send email from command line.
mbsacliMicrosoft Baseline Security Analyser.
memUsed to show memory usage.
mdUsed to create directories and sub-directories.
mkdirUsed to create directories and sub-directories.
mklinkUsed to create symbolic link to a directory.
mmcAccess Microsoft Management Console.
modeConfigure COM, LPT, CON system devies.
moreDisplay one screen of output at time.
mountvolCreate, list, or delete a volume mount point.
moveUsed to move files from one folder to another.
moveuserMove user account to a domain or between machines.
msgUsed to send a pop-up message to a user.
msiexecInstall, modify, consfigure using Windows Installer.
msinfo32Display system information.
mstscCreate a remote desktop connection.

N – Windows CMD Commands

 NDescription
nbstatDisplay NetBIOS over TCP/IP information.
netUsed to manage network resources and services.
netdomNetwork Domain Manager utility
netshDisplay or modify network configuration
netstatDisplay active TCP/IP connections.
nlsinfoUsed to display locale information
nltestList domain controllers, force remote shutdown, etc.
nowDisplay date and time.
nslookupCheck IP address on a Name Server.
ntbackupBackup data to tape using CMD or batch file.
ntcmdpromptRuns cmd.exe instead of command.exe in an MS-DOS application.
ntdsutilManage Active Directory Domain Services
ntrightsUsed to edit user account privileges.
ntsdOnly for system developers.
nvspbindUsed to modify network bindings.

O – Windows CMD Commands

ODescription
openfilesQueries or displays open files.

P – Windows CMD Commands

 PDescription
pagefileconfigDisplay and configure Virtual memory settings.
pathSet PATH environment variable for executable files.
pathpingLatency and Packet loss info for each node in the network path.
pauseUsed to stop processing of a batch file.
pbadminStarts Phone Book Administrator
pentntDetect Floating Point Division error in the Pentium chip.
perfmonAccess performance monitor in CMD
permsDisplay a user\’s ACL permissions for a file.
pingTest network connection to a computer.
popdGo to the latest path/folder stored by PUSHD command
portqryDisplay TCP and UDP port status.
powercfgUsed to configure power settings and know battery health.
printUsed to print a text file(s) from CMD.
printbrmFor backup/recovery/migration of the print queue.
prncnfgUsed to configure/rename a printing device.
prndrvrList/add/delete printer drivers.
prnjobsList/pause/resume/cancel print jobs.
prnmngrList/add/delete printers, display/set default printer.
prnportList/create/delete TCP printer ports, display/change port configuration.
prnqctlClear printer queue, print a test page.
procdumpMonitor system for CPU spikes, generate a crash report during a spike.
promptUsed to change the Prompt in CMD.
psexecRun a CMD process on a remote computer.
psfileDisplay remotely opened files, close an open file.
psinfoList system information about a local/remote machine.
pskillKill a process(es) using its name or process ID.
pslistDisplay process status and info about active processes.
psloggedonSee active users on machine.
psloglistDisplay event log records.
pspasswdUsed to change account password.
pspingUsed to measure network performance.
psserviceDisplay and control services on a machine.
psshutdownShutdown/restart/logoff/lock a local or remote machine.
pssuspendUsed to suspend a process on a local or remote computer.
pushdChange current folder and store previous folder for use by POPD.

Q – Windows CMD Commands

 QDescription
qgrepSearch file(s) for a given string pattern.
query process or qprocessDisplay information about processes.

R – Windows CMD Commands

 RDescription
rasdialDisplay Remote Access Service Status.
rasphoneManage RAS connections.
rcpCopy files to a computer running remote shell service.
recoverRecover readable data from a defective disk.
regDisplay/add/change registry keys and values in Windows registry.
regeditImport/export/delete settings from a .reg text file.
regsvr32Used to register/unregister a DLL file.
reginiUsed to change registry permissions.
relogExport performance counters to other formats like TSV, CSV, SQL.
remAdd comments in batch file.
renUsed to rename a file(s).
replaceUsed to replace a file with another file of same name.
reset sessionUsed to reset a remote desktop session.
rexecRun commands on remote machines running Rexec service.
rdUsed to delete a folder(s).
rmdirUsed to delete a folder(s).
rmtshareManage file and printer shares local or remote servers.
robocopyUsed to copy files and folders that have changed.
routeDisplay/change the local IP routing table.
rshRun commands on remote servers running RSH service.
rsmManage media resources using Removable storage.
runasRun a program as a different user.
rundll32Used to run a DLL program.

S – Windows CMD Commands

SDescription
scUse Service Controller to manage Windows services.
schtasksSchedule command(s) to run at a specific time.
seceditConfigure system security.
setDisplay/set/remove environment variables in CMD.
setlocalControl visibility of environment variables in a batch file.
setspnManage Service Principal Names for an Active Directory service account.
setxSet Environment Variables permanently.
sfcSystem File Checker
shareList/edit a file share or print on any computer.
shellrunasUsed to run a command as a different user.
shiftChange the position of the batch parameters in a batch file.
shortcutCreate a Windows shortcut.
shutdownShutdown the computer.
sleepPut computer to sleep for specified number of seconds.
slmgrSoftware Licensing Management tool for activation and KMS.
sortUsed to sort and display a redirected or piped input.
startStart a program, command, or batch file.
stringsFind ANSI and UNICODE strings in binary files.
subinaclDisplay/modify ACEs for file and folder permissions.
substAssociate a path with a drive letter.
sysmonMonitor and log system activity to Windows event log.
systeminfoDisplay detailed configuration information about the computer.

T – Windows CMD Commands

 TDescription
takeownUsed to take the ownership of a file.
taskkillUsed to terminate on or more running processes.
tasklistDisplay a list of running apps and services.
tcmsetupEnable/disable TAPI client.
telnetCommunicate with a remote machine using TELNET protocol.
tftpTransfer files to and from a remote machine running TFTP protocol.
timeDisplay/change system time.
timeoutDelay a batch file execution for specified seconds.
titleChange the text on top of CMD window.
touchChange file timestamps.
tracerptProcess event trace logs and generate trace analysis report.
tracertTrace route to a remote host by sending ICMP request messages.
treeDisplay a folder structure in the form of a graphical tree.
tsdisconTerminate a remote desktop connection.
tskillTerminate a running process on a RD Session Host server.
tssutdnShutdown/reboot a terminal server remotely.
typeShow contents of a text file.
typeperfWrite performance data to a CMD window or a log file.
tzutilTime Zone Utility.

U – Windows CMD Commands

 UDescription
unlodctrRemove performance counter names and explain text for a service from the registry.

V – Windows CMD Commands

 VDescrption
verShow version number of installed OS.
verifyVerify whether files are saved correctly on the disk.
volShow disk volume label and serial number.
vssadminShow shadow copy backups, installed shadow copy writers and providers.

W – Windows CMD Commands

WDescription
w32tmAccess Windows Time Service Utility
waitforUsed to synchronise events between networked computer(s).
wevtutilRetrieve information about event logs and publishers.
whereFind and display file(s) in the current directory.
whoamiDisplay information about the active user.
windiffCompare contents of two files or sets of files.
winrmWindows Remote Management.
winrsWindows Remote Shell.
wmicWindows Management Instrumentation Command.
wuaucltWindows Update Agent to download new update files.

X – Windows CMD Commands

 XDescription
xcalcsChange ACLs for files and folders.
xcopyCopy files or directory trees to another folder.
This was the Full List of Windows CMD Commands which has been created with the inputs from SS64 and TechNet. A lot of attention has been paid while preparing it but if you find any discrepancy, feel free to notify.


Post a Comment

 
Top