A-Z Complete Windows CMD Commands List

A-Z Windows CMD Commands List [ Complete List ]

cmd commands Here is a list of all Windows CMDs sorted alphabetically along with an exclusive PDF of CMDs for future reference for professionals and novices alike.

Command Prompt and CMD commands are unfamiliar territories to most Windows users, they only know it as a black screen for troubleshooting system problems with some fancy commands. cmd commands

If you are a Linux user, then you would know how commands play an important role in various system operations – like how we fiddle with Ubuntu’s apt-get commands to install, update or upgrade software. Unlike Linux, Windows is a user-friendly operating system and we don’t need to play with CMD commands at all to accomplish our task. In most cases, people only open the command prompt when they need to repair a damaged drive, hide certain drives, create a hacking-like environment, etc. cmd commands


What are Command Prompt and CMD Commands?

Command Prompt, also known as cmd.exe or cmd – command line translation application in Windows NT series operating systems. And CMD commands are a specific set of instructions given to the command prompt to perform some kind of task or function on your Windows computer.

Most Windows CMD commands are used to automate tasks through scripts and batch files, perform advanced administrative functions, and troubleshoot and resolve certain kinds of Windows problems. cmd commands

So here is an A-Z list of Windows CMD commands to perform the required tasks that you normally perform using the GUI. You can also use these commands to do some interesting hacks through Windows – which we’ll cover soon.

How to access the command line?

Before we begin, let’s see how to open the Command Prompt program.

  1. You can run a command line program in three ways:
  2. Simply by typing cmd in the Start menu search box.
    If you’re using Windows 8, you can access the command prompt via a command prompt shortcut in the Start menu or the Applications screen.
  3. Or you can press CTRL+R to open the RUN utility, type cmd, and press Enter

Note: Many commands can only be run if the command prompt is run as an administrator. To open an elevated command prompt — Find the command prompt shortcut, then right-click it to display the options pop-up menu and select Run as administrator from the pop-up menu. Accept any User Account Control messages or warnings.


A-Z Windows CMD Commands 


CMD CommandsFunction
 addusers Used to add and list users in a CSV file
 admodcmd Used for bulk modifying contents in an active directory
 arp Address Resolution Protocol is used to map IP address to the hardware address
 assoc Used to change associations for file extensions
 associat One step file association
 at Run a command at a specific time
 atmadm Display connection info of the ATM adapter
 attrib Used to change file attributes
 bcdboot Used to create and repair a system partition
 bcdedit Used to manage boot configuration data
 bitsadmin Used to manage the Background Intelligent Transfer Service
 bootcfg Used to edit boot configuration in Windows
 break Enable/Disable break capability (CTRL+C) in CMD
 cacls Used to change permissions of files
 call Used one batch program to call another
 certreq Used to request a certificate from a certification authority
 certutil Manage Certification Authority files and services
 cd Used to change folder (directory) or go to a specific one
 change Used to change terminal services
 chcp Displays the number of active console code page
 chdir Same as cd command
 chkdsk Used to check and repair issues in the disk
 chkntfs Used to check the NTFS file system
 choice Accept user input (via keyboard) to a batch file
 cipher Used to encrypt/decrypt files and folder
 cleanmgr Used clean temp files and recycle bin automatically
 clip Copy result of any command (stdin) to Windows clipboard
 cls Clear CMD screen
 cmd Used to start a new CMD shell
 cmdkey Used to manage stored usernames and passwords
 cmstp Used to install or remove a connection manager service profile
 color Change the color of the CMD shell using options
 comp Compare contents of two files or two sets of files
 compact Compress files and folders on an NTFS partition
 compress Compress one or more files
 convert Convert a FAT partition to NTFS
 copy Copy one or more files to another location
 coreinfo Show the mapping between logical and physical processors
 cprofileCleans specified profiles of wasted space and disabled user-specific file associations
 cscmd Configure offline files on a client computer
 csvde Import or Export the data of an active directory
 date Used to display the date or change it
 defrag Used to defragment system hard drive
 del Used to delete a file(s)
 delprof Used to delete user profile(s)
 deltree Used to delete a folder and its sub-folders
 devcon Access the command line device manager utility
 dir Used to display files and folders list
 dirquota Manage File Server Resource Manager quotas
 diruse Used to display disk usage
 diskcomp Compare contents of two floppy disks
 diskcopy Copy data of one floppy disk to another
 diskpart Make changes to partitions of storage, both internal and connected
 diskshadow Access the Disk Shadow Copy Service
 diskuse View used space in folder(s)
 doskey Used to edit command line, recall commands, and create macros
 driverquery Display a list of installed device drivers
 dsacls View and edit access control entries for objects in active directory
 dsadd Used to add objects to active directory
 dsget View objects in active directory
 dsquery Find objects in an active directory
 dsmod Used to modify objects in an active directory
 dsmove Rename or move an active directory object.
 dsrm Remove objects from an active directory
 dsmgmt Manage Active Directory Lightweight Directory Services
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)
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
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
helpDisplay a list of commands and see online information for them
hostnameUsed to display host name of the computer
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)
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
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 devices
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, configure using Windows Installer
msinfo32Display system information
mstscCreate a remote desktop connection
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
openfilesQueries or displays open files
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
qgrepSearch file(s) for a given string pattern
query process or qprocessDisplay information about processes
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
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
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
unlodctrRemove performance counter names and explain text for a service from the registry
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
w32tmAccess Windows Time Service Utility
waitforUsed to synchronize 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 downIoad new update files
xcalcsChange ACLs for files and folders
xcopyCopy files or directory trees to another folder

And it is done! If you think we forgot to add any other cmd commands to this list, please let us know. Also, get a copy of the CMD command list in PDF format here. And expect more command-line tricks soon. Also, don’t forget to check the CMD keyboard shortcuts listed below.


Command line keyboard shortcuts 


Here are some important CMD keyboard shortcuts to make your work on the command line easier.

CMD Keyboard ShortcutsFunction
F1Pastes the last executed command (character by character)
F2Copies characters from the previous command
F3Repeats the last command
F4Deletes current prompt text up to the entered character
F5Pastes recently executed commands (does not cycle)
F6Pastes ^Z to the prompt
F7Shows list of all previous commands from the command history
F8Type character and press F8 key to cycle through matching commands
F9Asks for the number of the command from the F7 list to paste
Up ArrowCycles through previous commands from the command history
Right ArrowAuto-fills characters from previous command one by one
TabAuto-fills file/folder names
Alt+F7Clears command history
EscErases current line


Command line keyboard shortcuts 

Attrib (syntax: attrib) – You can use the attrib command to display or change the read-only, archive, system, and hidden attributes of any computer file or directory. You can run this command at the command prompt in all versions of Windows.

Background Smart Transfer Service (syntax: bitsadmin) – The bitsadmin command allows you to create and monitor downIoads and uploads. By default, it gives you access to information related to your tasks in the command window. However, if you want to access information about a task created by another user, you will need to run the command in a command prompt with administrator privileges.

Change Directory (syntax: chdir) – Use the chdir command to display the current directory and switch directories. For example, if you type chdir and press Enter, the current directory will be displayed. To go to the top level, type chdir\ and press Enter. This command is one of the most basic cmd commands and is available in all versions of Windows.

Check Disk (syntax: chkdsk) – This is a built-in tool in Windows that helps you find and fix hard disk errors. Depending on the size and condition of your hard drive, chkdsk may take a few minutes to an hour or longer to run. You can do the same with a tool like System Mechanic.

Cmd (syntax: cmd) – Use the cmd command to launch a command prompt from the run dialog.

Color (syntax: color) – This is one of the best cmd tricks you will come across. Allows you to change the background and text color of the command line window. To see the available color options, run color/ at the command line.

Delete (syntax: del) – You can use this command to delete files. Note that when you delete files with the del command, you delete them completely. So use this powerful command with caution.

Directory (syntax: dir) – The dir command is one of the most popular command line commands and lists all the files and subdirectories in a particular directory. It also displays other useful information, including the total number of files listed in the directory, the total amount of free space, and the drive’s serial number.

Erase (syntax: erase) – This command is the same as the del command. You can use it to permanently delete any file.

Exit (syntax: exit) – Do you want to exit the current command line session? Simply type exit and press Enter.

Find (syntax: find) – This is one of the most popular Windows command line commands. Allows you to search for a specific sequence of characters in one or more files.

Group Policy Results (syntax: gpresult) – Use this command to display the Group Policy that applies to your computer.

Help (syntax: help) – If you want to learn about the syntax and usage of a command, you should use the help command.

Internet Protocol Configuration (syntax: ipconfig) – This is one of the most useful cmd commands for getting network information. Displays the default gateway, subnet mask, and IP address for all network adapters. To run the command, simply type ipconfig and then press Enter. You will see something like this in the command line.

Ksetup (syntax: ksetup) – The ksetup command allows you to connect to a Kerberos server.

Logoff (syntax: logoff) – Run this command to end the user’s session from the command line. You can also use the logout command to end sessions on remote computers.

Create directory (syntax: mkdir) – As the name suggests, the mkdir command allows you to create one or more new directories within the current directory. In the screenshot below, I’m using it to create a new directory called “computer”.

Message (syntax: msg) – The msg command is one of the most interesting command line tricks. You can use it to talk to other users on the network through the command line, just like old computers that didn’t have a graphical user interface.

Net (syntax: net) – Use this command to manage various aspects of your network. Its settings include network users, network shares, and network print jobs, among others.

Openfiles (syntax: openfiles) – Use the openfiles command to view or unmount files and directories open on your computer.

Ping (syntax: ping) – The popular cmd command, ping, is used to find and troubleshoot network problems.

Print (syntax: print) – Did you know that you can print a text file from the command line in Windows 10? Just use the print command, which is also available in other versions of Windows. However, you can use this command to print only those files that you can access from the command line.

Qprocess (syntax: qprocess) – This command provides information about all running processes.

Rename (syntax: rename) – You can change the name of a file, folder, or directory from the command line using the rename command. However, you must have “write” or “edit” permission on the file, folder, or directory you are renaming to complete the command.

System File Checker (syntax: sfc) – If you suspect problems with important Windows files, you can check and replace them by running the sfc command.

Shutdown (syntax: scandisk) – There are two cmd prompt commands you can use to log off your computer. The logout command is the first and the shutdown command is the second. However, you can do much more with the latter, such as shutting down, restarting, and hibernating not only your computer, but also any other computer you have access to over the network.

Start (syntax: start) – Wondering how to open a new cmd window from an existing one? Just type start in the command line and press Enter. A new command window will pop up in a flash.

Systeminfo (syntax: systeminfo) – To learn more about your computer’s configuration, such as details about its BIOS, hard drive, processor, operating system, and other specifications, simply run the systeminfo command. You need a command prompt with administrative privileges to run this command.

Taskkill (syntax: taskkill) – Use the taskkill command to kill one or more processes from the command line.

Umount (syntax: umount) – You can use the umount command to remove network file system drives.

Ver (syntax: ver) – The ver command is one of the simpler Windows commands and allows you to check the current version number of Windows. When I ran the ver command, the following information appeared:

W32tm (syntax: w32tm) – You can use the w32tm command to diagnose Windows time problems.

Xcopy (syntax: xcopy) – Want to copy files located in one directory to another using the command line? Just execute the xcopy command. It is available in all versions of Windows.

Wrapping Up:

A lot has changed in Windows 10, but the command line remains the same. It’s still a powerful tool and can give you access to several features that you won’t find in the otherwise intuitive Windows 10 GUI. This command line interpreter allows you to interact directly with your system, of course using the wealth of Windows Cmd commands available. In this post, I have listed many commands that will hopefully prove useful to the average Windows user. Thank you for reading!


Hello, I'm SUMAN from India. I’m currently working on Cyber Ethical Hacking. I’m currently learning more about Hacking, Web Design, Android ROM, Mod Hacking App
Notify of
Inline Feedbacks
View all comments
Back to top button
Would love your thoughts, please comment.x