Windows Command Prompt: List of Commands & Their Uses

By Dominic Cooper on April 22, 2023

There are lots of Windows Command Prompt commands, and out of all these commands, a significant number are specifically related to the Windows servers, while the remaining commands are offered for desktop versions.

If you are unaware of these commands and want to know about them, you are probably in the best possible place. This article will tell you all about the commands you can use in the Command Prompt along with their uses in brief.

KEY TAKEAWAYS

List of Commands in Windows Command Prompt

Windows Command Prompt commands

The list of commands, which are typically a set of instructions for the Command Prompt to perform, comprises basic as well as network-based CMD commands.

Here is the list of them, sorted alphabetically, along with their uses:

Commands Starting with A:

Arp – A short for Address Resolution Protocol, this particular command is used for displaying or changing entries in the ARP cache or for mapping the IP address to the hardware address.

Assoc – This particular command is used to change the associations with respect to a file extension.

Associate – Use this command as a single-step file association.

Attrib – This command is used when you need to alter the attributes of any file or a directory.

Auditpol – Change or display audit policies by using this command.

Commands Starting with B:

Bcdboot – This command helps in creating or repairing any system partition, copying boot files to it, and creating a new BCD store for the system.

Bcdedit – You can use this command for viewing, managing, and making changes to all data related to boot configuration.

Bdehdcfg – You can use this command to make a hard drive ready for BitLocker Drive Encryption.

Bitsadmin – This is a command used for managing, creating, and monitoring the uploading and downloading jobs related to BITS or Background Intelligent Transfer Service.

Bootcfg – This command is used specifically in Windows for editing boot configuration and viewing, creating, or changing contents of the hidden boot.ini file, which helps in identifying the folder, partition or hard drive Windows is in.

Bootsect – If you want to organize the master boot code in order to make it compatible with BOOTMGR or NTLDR, you can use this command.

Break – Using this command will allow you to enable or disable the break capability.

Commands Starting with C:

Cacls – This is the command that allows changing the permissions of the files or to change or display the ACL or Access Control Lists of files.

Call – One batch program can call another by using this specific command or run a batch program or script from or within another.

Cd – A short for Change Directory or the chdir command, this will enable you to go to a specific folder or simply to another folder.

Certreq – Requesting any certificate from the certification authority or performing different functions related to the certificate authority are done through this command.

Certutil – This particular command is used to manage the files and services of the certification authority. It is also used to discard or display information about the certificate authority apart from additional functions.

Change – If you want to change the terminal services and server settings such as logons, install modes, and COM port mappings, you will need to use this specific command.

Chcp – Use this command for the Command Prompt to show the number of the active code page console or configure it.

Chdir – This is an alternative to the cd command that shows the folder and drive letter you are working in currently or changes the directory or drive that you need to work in.

Checknetisolation – Test the applications that need network capabilities by using this command.

Chglogon – This command will enable, disable, or drain session logins from the terminal server.

Chgport – This particular command shows or changes mappings of the COM port for DOS compatibility.

Chgusr – The install mode of the terminal server can be changed by using this command.

Chkdsk – If there are issues on the disk that need to be checked and repaired, this command should be used.

Chkntfs – Similar to the above command, this particular command is meant for the NT file system. It displays or configures the disk drives during the boot process.

Choice – This is the command for accepting the input given by the user to any batch file via the keyboard. It also offers a list of choices and returns its value to the program.

Cipher – You can encrypt or decrypt any file or folder by running this command in the Command Prompt. It will also show or change the status of encrypting the files or folders on an NTFS partition.

Cleanmgr – When you want to clean the recycle bin or the temp files from your system automatically, this CMD command should be used.

Clip – This command helps in copying or redirecting the result of any command to the Windows clipboard.

Cls – Using this command will clear the screen and remove all earlier entries.

Cmd – When you want to initiate a new command shell, this command is to be used.

Cmdkey – The usernames and passwords stored in the system are managed with the help of this command.

Cmstp – This command will either install or uninstall a Connection Manager service profile.

Color – If you want to make the CMD shell more attractive by changing the color of the background, you can use this command.

Comp – This command will let you compare two specific files or sets of files.

Compact – When you need to compress the folders or files on an NTFS partition, this is the command you should use to change or show the state.

Convert – When you need to convert a partition from FAT or FAT32 formatted files into NTFS format, this command will help.

Copy – As in normal operation, copying one or more files from one location to another can be done by using this command.

Coreinfo – This command will display the mapping between the physical and logical processors.

Cprofile – Specific types of profiles of disabled file associations that are user-specific and of the wasted space are cleaned by this particular command.

Cscmd – If you are working on a client computer and want to configure the offline files on it, you will need to use this specific CMD command.

Cscript – Scripts can be executed through the Microsoft Script Host by using this command.

Commands Starting with D:

Date – This command displays or changes the current date.

Defrag – Use this command to defragment the specified hard drive of the system.

Del – One or more files can be deleted by using this command.

Delprof – The profiles of users can be deleted by using this specific command.

Dir – This command displays the list of the files and folders apart from other information such as the serial number of the hard drive, the total number of listed files and their collective size, the total volume of free space available on the drive, and more.

Diskpart – This is the command that allows making changes to storage partitions, both connected and internal. You can manage, create, or delete hard drive partitions with this command.

Diskperf – This command helps the users manage the performance counters of the disk remotely.

Diskraid – Using this command will initiate the disk RAID tool for managing and configuring RAID arrays.

Dism – A short for Deployment Image Servicing and Management, this command helps manage the Windows image features.

Dispdiag – The log of display system information will be displayed when you use this command.

Diskshadow – The command will allow you to access the Disk Shadow Copy Service.

Diskuse – This is the command used for viewing the space used in the folders.

Djoin – If you want to create a new computer account within a domain, you can use this command.

Doskey – Editing the command line, creating macros, and recalling earlier commands can be done with this command.

Driverquery – The list of the device drivers installed in the system is displayed by this command.

Commands Starting with E:

Echo – This command will show the message from a script or batch file and also help in turning the echoing feature on or off.

Endlocal – The localization environment changes will end within a batch file when you use this command.

Erase – Just like the delete command, using this command will also delete one or more files.

Esentutl – With the help of this command, you can manage Extensible Storage Engine databases.

Eventcreate – If you have admin rights, you can use this command to add a custom event to the Windows event log.

Eventquery – The list of events from the event log along with their respective properties will be displayed when you use this command.

Exit – This is the command to use to quit the current batch script or exit from the command line.

Extrac32 – This is a similar command as above.

Commands Starting with F:

Fc – This is another command that is used to compare two individual files or sets of files and show the differences between them.

Find – You can find a specific text string in any file by using this command.

Findstr – Almost similar to the above command, this will help you know the string patterns in the files.

Finger – Using this command will help you view the information related to the users of a specific remote computer.

Flattemp – This command is used to enable or disable flat temporary folders.

Fltmc – If you want to list, load, unload, or manage filter drivers, use this command.

Fondue – A lot of optional features of Windows can be installed from the command line by using this command, which is short for Features on Demand User Experience Tool.

For – If you want to run a command for any specific parameter in a loop, then this is the command to use.

Forfiles – Batch processing of the files selected can be done by using this command.

Format – This command helps in formatting a disk for a specific file system.

Freedisk – If you want to free up space on a disk, use this command.

Fsutil – A short for File System Utility, this command will help in managing the properties of both files and drives and perform a lot of other functions with respect to FAT and NTFS.

Ftp – This is the command to use for transferring files from one computer system to another.

Ftype – This command allows modifying and displaying file extension type associations or opening a specific file type by defining a default program.

Commands Starting with G:

Getmac – This command shows the MAC or Media Access Control address of the network adapter and controllers in your system.

Goto – This command directs the batch program to a line identifiable by the label.

Gpresult – This command shows the Resultant Set of Policy and Group Policy Settings for a user.

Gpupdate – You can use this command to update the local and active directories with respect to the group policy settings.

Commands Starting with H:

Help – This command will not only display the list of commands but will also show more information related to any other commands along with their online information.

Hostname – If you want the name of the current host to be displayed, use this command.

Commands Starting with I:

Icacls – Like cacls, use this command to change the permissions of files and folders.

If – This command will help with conditional processing and functions of the batch programs.

Ipconfig – Changing or displaying the Windows IP configuration is done through this command for individual network adapters using TCP/IP.

Iscsicli – This command helps manage iSCSI by starting the Microsoft iSCSI initiator.

Commands Starting with K:

Klist – This command will list or purge the Kerberos service tickets.

Ksetup – This command will configure the connections to the Kerberos server.

Ktmutil – This command will initiate the Kernel Transaction Manager utility.

Commands Starting with L:

Label – You can change the name of a disk by using this command and even manage its volume label.

Licensingdiag – This is the command that produces data files and a text-based log for Windows licensing and other product activation information.

Lodctr – The registry values can be updated with the latest performance counters with the help of this command.

Logman – If you want to manage the logs of the Event Trace Session and Performance Monitor, use this command.

Logoff – This command is used to log off the user or terminate the session.

Lpq – The print queue status will be displayed when you run this command.

Lpr – This specific command is used to send a file to a PC that is running the Line Printer Daemon service.

Commands Starting with M:

Makecab – Also known as the Cabinet Maker, this command is used for compressing one or more files losslessly.

Read Also:  Windows 8 vs Windows 10: The 6 Differences

Manage-bde – While configuring BitLocker Drive Encryption from the command line, you will need to use this specific command.

Md – This command creates a directory and is the same as the mkdir command, but just a short form of it.

Mkdir – You can create a new folder by using this particular command.

Mklink – Run this command in the Command Prompt to create a figurative link.

Mode – System devices such as COM and LPT ports can be configured by using this command.

Mofcomp – This command is run to display the data in the Managed Object Format (MOF) file.

More – This is the command used for displaying information available in a text file or for numbering the results of any other CMD or MS-DOS command.

Mountvol – When you use this command, it will create, remove, or display volume mount points.

Move – This command will not only move one or more files from one folder to another but will also rename the directories.

Mrinfo – The information regarding the neighbors and interfaces of the router is made available through this command.

Msg – You can send a message to a user by using this specific command.

Msiexec – This command will start the Windows Installer when you want to install or configure software.

Muiunattend – This is the command that will initiate the Multilanguage User Interface unattended setup procedure.

Commands Starting with N:

Nbtstat – If you want to see the TCP/IP information of a remote computer along with other statistics, you can use this command.

Net – This is the command used typically for configuring, displaying, and correcting a diverse range of network settings.

Net1 – This command is also used for the same purpose as the Net command.

Netcfg – You can use this command to install the Windows Preinstallation Environment (WinPE) for deploying workstations.

Netsh – This command will initiate a Network Shell, which is a command-line utility used for managing local or remote computer network configuration.

Netstat – You can see all open network connections along with the listening ports displayed when you use this command.

Nltest – Using this command allows testing the secure channels among the computers within a particular domain or among the domain controllers trusting one another.

Nslookup – The hostname of the IP address used will be displayed when you use this command. Ideally, it will ask the organized DNS server to determine the IP address.

Commands Starting with O:

Openfiles – If there are files and folders open in the system, this specific command will display and disconnect them.

Commands Starting with P:

Path – This is a specific command that will set or display a particular path available to a particular executable file.

Pathping – This command sends messages to a remote computer and displays information regarding the latency of the network as well as the loss at every hop or the number of routers it has to pass through.

Pause – Used with the script or batch file, this command will pause file processing and display a message saying “Press any key to continue…” in the command window.

Ping – If you want to check the connectivity at the IP level for any remote computer, you can use this command, which will send an ICMP or Internet Control Message Protocol Echo Request message to it.

Pkgmgr – The Windows Package Manager will be initiated with this particular Command Prompt command for installing, uninstalling, configuring, and updating packages and features for Windows.

Pnpunattend – This command will help automate the installation process of the drivers for the hardware devices.

Pnputil – Running this command will initiate the Microsoft PnP Utility so that you can install and use a Plug and Play device from the command line.

Popd – This command is run from within a script or batch file for changing the current directory to the most recently stored one by the pushd command, explained later.

Powercfg – This command helps with the power management settings in Windows from the command line.

Print – Use this command to print a specific text file to a particular printing device.

Prompt – If you want to customize the text of the command in the prompt, use this command.

Pushd – This command will store the directory for use within a script or batch program.

Pwlauncher – Use this particular command to display, enable, or disable the status of the Windows to Go startup selections.

Commands Starting with Q:

Qappsrv – This command will show all of the Remote Desktop Session Host servers on the network that are available.

Qprocess – This is the command to display information about the processes running.

Query – The status of a specific service is displayed when you use this command.

Quser – The information about the users who are logged into the system currently is displayed by this command.

Qwinsta – Information regarding all of the open remote desktop sessions is displayed when you run this particular command in the Command Prompt.

Commands Starting with R:

Rasautou – If you want to manage Remote Access Dialer AutoDial addresses, use this command.

Rasdial – This is the command used for starting or ending the connection for a Microsoft client in a network.

Rd – This is the short form for the rmdir command, explained later.

Reagentc – Configuring the Windows Recovery Environment (RE) is done by using this command.

Recover – This command will recover all readable data from a defective, corrupt, or bad disk.

Reg – Managing the Windows Registry from the command line is done by using this command.

Regini – You can set or alter the registry permissions and values from the command line by using this command.

Register-cimprovider – If you want to register a CIM or Common Information Model provider in Windows, you will need to use this specific command.

Regsvr32 – You can register a DLL or a Dynamic Link Library file as a component of the Windows Registry by using this command.

Relog – You will be able to create fresh performance logs by using the available data in the current performance logs when you run this command.

Rem – All remarks and comments in a batch or a script file can be recorded by using this command.

Ren – This is the short form for the rename command.

Rename – This command will change the name of the specified file.

Repair-bde – If a drive that is encrypted using BitLocker is damaged, this command is used to decrypt and repair it.

Replace – This command is used to replace one or more files.

Reset – The hardware and software of the session subsystem will be reset to their known original values when you use this command.

Rmdir – If an existing or empty folder is to be deleted, this is the command to use.

Robocopy – Also referred to as Robust File Copy, files and directories are copied from one location to another by using this command.

Route – Manipulating the network routing tables is usually done by using this command.

Rpcping – If you want to ping a server via RPC or Remote Procedure Call, use this specific command.

Read Also:  11 Differences Between Windows 7 and 10

Runas – This command enables using the credentials of another user to execute a program.

Rwinsta – This is the same as the reset session command.

Commands Starting with S:

Sc – This command will communicate with the Service Control Manager and configure the information.

Schtasks – Scheduling specific commands or programs to run at a particular time is done by this command, which also helps create, change, delete, query, and end such programmed tasks.

Sdbinst – You can install customized SDB database files with this command.

Secedit – If you want to configure the existing security configuration of a system to a template and compare and analyze it, this is the command to use.

Set – Displaying, enabling, or disabling environment variables is done with this command.

Setlocal – Inside the script or a batch file, this command will set the localization of environment variations.

Setspn – The Service Principal Names (SPN) for the Active Directory (AD) service account are managed by this command.

Setx – Within the system or user environment, you can set or change the variables by using this command.

Sfc – Also known as the System File Checker or Windows Resource Checker, this command will check vital Windows system files and even replace them.

Shift – In a batch or script file, the location of replaceable parameters can be changed by this command.

Shutdown – This command will log off, restart, or shut down the current system or a remote PC.

Sort – This command reads the data available from a particular input, sorts it, and returns the results to the Command Prompt screen, any other output device, or a file.

Start – This command opens a new command line window or an application without generating a new window.

Subst – Use this command to link a local path with the drive letter.

Sxstrace – When you use this command, a programming diagnostic tool, such as the WinSxs Tracing Utility, will be initiated.

Systeminfo – All fundamental information about the Windows configuration of a local or remote computer will be displayed by this command.

Commands Starting with T:

Takeown – Use this command to access a file again that was previously denied by the administrator.

Taskkill – Similar to ending tasks in a Task Manager, this command will terminate the current task.

Tasklist – The list of all apps, services, and current processes on a local or remote PC is displayed with this command.

Tcmsetup – Use this command to either disable or set up a TAPI, or Telephony Application Programming Interface, client.

Telnet – Communication with remote computers is established by this command.

Tftp – A remote PC using the TFTP or Trivial File Transfer Protocol daemon or service can transfer files to and from it by using this command.

Time – The current time is displayed or can be changed by this command.

Timeout – Ignore key presses or assign a particular timeout value to a process in a script or a batch file with this command.

Title – Set the title of the Command Prompt with this command.

Tlntadmn – The local or remote PC running the Telnet server can be administered by this command.

Tpmvscmgr – This command will allow you to create or remove TPM virtual cards.

Tracerpt – Data in real time and trace logs from the instrumented providers of event traces can be processed with this specific command.

Tracert – Use this command to send Internet Control Message Protocol (ICMP) Echo Request messages to a particular remote computer.

Tree – This command displays the structure of a folder graphically for any particular path or drive.

Tscon – You can connect a user session and a remote desktop session with this command.

Tsdiscon – This command will disconnect the above session.

Tskill – This command will end a particular process.

Type – Use this command to show the information in a text file.

Typeperf – The performance data will be displayed in the Command Prompt window by this command, which will also write it in a particular log file.

Tzutil – Configure or simply display the time zone of the current system with this command. You can also activate or deactivate Daylight Saving Time adjustments.

Commands Starting with U:

Unlodctr – The names of the Explain text and Performance counter are removed from the Windows registry with this command for any device driver or service.

Commands Starting with V:

Vaultcmd – The saved credentials are displayed, created, or removed by this command.

Ver – The current version of the operating system is displayed by this command.

Verify – The ability of CMD to verify the correctness of a file written to a disk can be enabled or disabled by using this command.

Vol – The serial number and the volume label for a particular disk are displayed when you use this command.

Vssadmin – This command displays the Volume Shadow Copy Service administrative tool in a command line.

Commands Starting with W:

W32tm – This particular command is used to detect issues with Windows Time.

Waitfor – Use this command to send or wait for a signal.

Wbadmin – You can start or end a backup job, see the details of earlier backups, list all items within them, and the status report of a running backup by using this command.

Wecutil – Subscriptions to events forwarded from the computers with WS-Management support are managed by this command.

Wevtutil – Start the Windows Events Command Line Utility with this command for managing publishers and event logs.

Where – Files that match a particular pattern can be searched when you use this command.

Whoami – Use this command and you will be able to retrieve group information or a username on a given network.

Winmgmt – Start the command-line version of the scripting tool, Windows Management Instrumentation or WMI, by running this command.

Winrm – Initiate the command-line version of Windows Remote Management with this command to manage safe communications between the local and remote computers using web services.

Winrs – The source command window of a remote host can be opened with this command.

Winsat – This command will initiate the Windows System Assessment Tool to assess different attributes, features, and abilities of a Windows computer.

Wmic – Use this command to initiate the scripting interface, Windows Management Instrumentation Command (WMIC) line, to simplify the use of WMI and system management through it.

Wsmanhttpconfig – All aspects of the Windows Remote Management (WinRM) are managed by using this command.

Commands Starting with X:

Xcopy – One or more directory trees or files can be copied from one location to another with this powerful copy command.

Xwizard – A short for Extensible Wizard, this command will enable registering data, usually from a preconfigured XML file, in Windows.

Conclusion

In the end, remember that, though most of these commands are usable in all versions of Windows OS, including 10 and 11.

There are lots of other commands as well but those are not included in the list since they are not used today and their functions are either removed or done by other commands.