CMD commands: List of all MS-DOS commands

All Windows systems include a series of commands that allow you to transmit commands directly to the operating system. They are known as CMD commands, DOS commands, or MS-DOS commands.

These are simple instructions that can be used in different ways, the best known of which is by entering them in the CMD command console (in fact, "CDM" corresponds to the name of the command or executable that opens the window or command prompt), although they can also be used in scripts or batch files.

What are CMD commands or MS-DOS commands?

The CMD command console, command interpreter or Command Prompt as some know it, is a tool included in all versions of Windows. It is a black window where the commands with the necessary commands and options are written and the Enter key is pressed to execute said command. So far easy enough, right?

CMD command console or command prompt, with a simple command "cd xxx"

Access to the CMD command console

The CMD command console You can start it by searching for its access in: All Programs -> Accessories or by typing in the Start box, in Run or in Cortana: CMD and pressing the Enter key.

It is also possible to open an instance of the console within any directory or folder, for that with the Shift key pressed right click with the mouse and in the menu that appears choose «Open command window here«.

MS-DOS Commands Included in Windows

Windows CMD commands are an inheritance from early MS-DOS operating systems. In them, all the instructions had to be executed manually using commands similar to those in the list that we attach below.The use of these DOS commands remains fully valid today.

Many have been recently added as they were only used as self-contained packaged tools or kits for use by professionals.

We can extract additional information from the DOS command console such as the characteristics, how to use and options of any command typing the following:

CommandName /?

Internal commands and external commands

Internal or resident DOS commands are those commands that are transferred to memory when the operating system is loaded. These commands are stored in a file named COMMAND.COM, and can be executed without the need to have DOS in the default drive -the drive where we are located-.

Some internal commands: CHCP, CHDIR, CLS, COPY, CITY, DATE, DEL, MKDIR, PATH, PROMPT, RENAME (REN), SET and TIME, among others.

External DOS Commandsrather, they are stored in separate or external files. It is necessary that we have this file in the default unit to be able to execute the order in question.

For example, the CHKDSK command is an external command. On Windows, it is located in the folder C: \ Windows \ System32 \ in the CHKDSK.EXE file.

Some external commands: CHKDSK, COMP, DISKCOMP, DISCOPY, FDISK, FIND, FORMAT, JOIN, KEYB

List of all CMD commands included in Windows

ARPMS-DOS command that caches the correspondence between the IP addresses and the physical addresses of the adapter or network card. It is used in networking tasks to optimize the performance of connections and to solve conflicts.
ASSOCIt shows or modifies the associations of the file extensions, that is, the action that Windows must perform according to the extension that the file has.
ATThe AT command schedules the execution of commands and programs on a computer at a specified time and date. The scheduling service must be running to use the AT command.
ATTRIBShow or change the attributes of a file. In Windows, an attribute is assigned to each file, according to the role or objective that they are going to play on the computer, be it a hidden file, system, read-only, etc. With the ATTRIB command it is possible to know those established in a certain file and remove it or assign it another one.
AUDITPOLIt is used to show or change permission settings
BITSADMINIt is used to create, manage and monitor file upload and download tasks.
BREAKSets or removes the extended check for Ctrl + C in the console.
BCDBOOTBCD boot file creation and repair tool. The command line tool bcdboot.exe is used to copy essential boot files to the system partition and to create a new BCD store on the system.
BCDEDITBoot Configuration Data Store Editor (BCD)

You can use Bcdedit.exe to add, remove, edit, and append entries in the boot configuration data store.

BOOTCFGThis command-line tool can be used to configure, query, change, or delete the boot entry settings in the BOOT.INI file on pre-Windows Vista operating systems.
CACLSMS-DOS command that displays or modifies file access control lists (ACLs).
CALLCall a second batch from a running one.
CDShow name or change to current directory
CHCPDisplays or sets the active code page number.
CHDIRShow name or change to current directory, same as CD
CHKDSKCheck, verify and repair disk errors.
CHOICEThis tool allows users to select an item from a list of options and returns the index of the selected option.
CIPHERDisplays or alters the encryption of directories [files] on NTFS partitions.
CLEANMGRMS-DOS command that frees disk space, allows you to save your options in memory.
CLIPRedirects output from command line tools to Windows Clipboard. This text output can be pasted into other programs.
CLSErases and clarifies symbols or text on the screen.
CMDStart a new instance of the console
CMDKEYCreate, submit, and delete stored usernames and passwords.
COLOURSets the foreground and background colors of the console
COMPDOS command that compares the contents of two files or a set of files.
COMPACTThis CMD command displays or changes the compression status of files on NTFS partitions.
CONVERTMS-DOS command that converts FAT volumes to NTFS volumes. You can not convert the current unity.
COPYCopy one or more files to another location
CSCRIPTIt allows executing VBS files on the console containing scripts written in VBScript language. It can also be used in batch files with the // B option, preventing scripting warnings and error messages
DATEShow or set the date.
OF THEDelete one or more files.
DEFRAGLocate and consolidate fragmented files on local volumes to improve system performance.
DIRDisplays a list of files and subdirectories in a directory.
DISMProvides information, installs, uninstalls, configures and updates additional features and Windows imaging packages.

For example, to show installed Windows features that can be uninstalled use:

DISM.exe / Online / English / Get-Features / Format: Table

DISKCOMPCompare the contents of two floppy disks.
DISKCOPYCopy the contents of one floppy disk to another.
DISKPARTDisplays or configures disk partition properties.
DOSKEYThis CMD command edits command lines, memorizes Windows commands, and creates macros.
DRIVERQUERYDisplays the current status and properties of the device driver.
THREW OUTShow messages, or turn echo on and off
ENDLOCALTerminate the search for environment variables of the batch file
ERASEDelete one or more files, same as DEL
EXPANDMS-DOS command that expands one or more compressed files
EXITExits the CMD.EXE program (command interface)
FCCompare two files or set of files and show the differences between them
FINDSearches for a text string in one or more files.
FINDSTRSearch for text strings in files.
FORExecute a command simultaneously on multiple files, reducing the amount of code required for multiple tasks. It is one of the commands that offers the most practical benefits.
FORFILESUse command something similar to FOR, select one or more files and execute a command in each one of them. It allows a multitude of useful options little exploited.
FORMATAllows you to give different formats to hard drives or other devices for use with Windows
FSUTILDOS command that displays or sets file system properties. It has several subcommands for effective administration of the file system and volumes.
FTYPEDisplays or modifies the file types used in a file extension association
GOTODirects the Windows command interpreter to a line in a batch file.
GPRESULTMS-DOS command displaying group policy information by computer or user
GPUPDATEUpdates the changes made in the Local Group Policy Editor.

Allows any of the established policies to be activated either immediately, upon restart or upon login.

To get them to activate immediately use: GPUPDATE / force

GRAFTABLAllows Windows to display an extended character set in graphics mode
HELPProvides help information for Windows commands
ICACLSMS-DOS command that displays, modifies, backs up, or restores access control lists (ACLs) for files and directories
IFExecutes commands conditionally, is used to define error values, compare strings, prove file existence, and make mathematical comparisons.
IPCONFIGDisplays the parameters of a network connection. By default, only the IP address, subnet mask, and default gateway are displayed for each TCP / IP-bound adapter.
LABELThis CMD command Create, change or delete the volume label of a disk
MEMShows the amount of free and used memory on the system
MDCreate a directory or folder
MKDIRDOS command to create a directory, same as above
MKLINKCreate symbolic links and hard links
MODESet up a system device
MOREMS-DOS command displaying information screen by screen
MOVEMove one or more files from one directory to another on the same drive
MSTSCInitiate a remote connection to the desktop
NBTSTATShows current TCP / IP connections and protocol statistics using NBT (NetBIOS over TCP / IP)
NETConfigure a wide variety of parameters in networks.
NETCFGIt is used to install Windows Preinstallation Environment (WinPE), a minimal and lightweight version of Windows used by developers
NETSHThe NETSH (Network Shell) command enables you to configure, conflict, and manage different network components using the command line locally or remotely.

Displays and configures the status of the components of the installed network protocols. Netsh commands are organized in the form of a tree, each technology and protocol has its own context.

NETSTATShows current TCP / IP connections and protocol statistics. Allows monitoring of all active connections
NLSFUNCLoad the specific information of a country or region
NLTESTThe NLTEST command is used to test through secure channels between Windows computers in different domains and between trusted domain controllers.
NSLOOKUPThis CMD command displays information about the DNS servers assigned to your network connection. It allows making requests to these servers.
OCSETUPStarts Windows Optional Component Setup tool that installs additional Windows options
OPENFILESDOS command showing shared files opened by remote users
PATHShow or set a search path for executable files
PAUSEMS-DOS command that pauses the console and displays a message
PINGAllows you to test a network connection, sending and receiving a data packet.
POPDRestores the previous value of the current directory saved by PUSHD
POWERSHELLRuns an instance of Windows PowerShell, the new command console included in Windows on systems after Windows Vista.

When PS is shown in the console symbol it means that you are in the PowerShell environment, so that you enter from that moment it will be related to this interpreter, to return to the console just type CMD and press Enter.

PRINTPrint a text file
PROMPTChange Windows command prompt
PUSHDMS-DOS command that saves the current directory and then changes it
QAPPSRVDisplays the RD session host servers available on the network
QPROCESSDisplays information about processes
I WANTShows the current status and parameters of a specific service
QUSERShow information about users who have logged in to the system
QWINSTADisplays information about Remote Desktop sessions
RASDIALIt is used to start or stop a dial-up or dial-up connection.
RDRemove or delete a directory or folder
RECOVERDOS command to recover readable information from a damaged or faulty disk
REGIt is used to manage all the Registry Editor parameters from the command line and batch files. It is possible to add, modify keys, values, export branches, etc.

The REG command is made up of several subcommands, each one for a completely different use, they are:

REG QUERY, REG ADD, REG DELETE, REG COPY, REG SAVE, REG RESTORE, REG LOAD, REG UNLOAD, REG COMPARE, REG EXPORT, REG IMPORT and REG FLAGS

REGEDITThe REGEDIT command allows you to import, export or delete settings in the registry from a plain text file with a .reg extension.
REGSVR32Register DLL libraries to incorporate them into the registry
RELOGRelog creates new performance records from existing performance record data by changing the sampling interval or converting the file format.

Supports all performance log formats, including Windows NT 4.0 compressed logs

REMMark comments in batch files or CONFIG.SYS. The line in a batch that begins with REM is considered a comment
RENDOS command that renames one or more files
RENAMERename one or more files, same as above
REPLACEReplace files
RMDIRRemove a directory
ROBOCOPYAdvanced utility to copy folders and directories in Windows.
RESET SESSION(Rwinsta) Reset session subsystem hardware and software to known initial values
ROUTEDOS command to manipulate network routing tables
RPCPINGPings the server using RPC
RUNESIt is used to run a program using the credentials or rights of another user
SECEDITAnalyze the security of the system and make the comparison with a specific template
SETShow, set, or remove Windows environment variables
SETLOCALStart the local environment changes section in the console
SETVERThe SETVER command is used to set the MS-DOS version number that is reported to a program
SETXCreate or modify environment variables in the user or system environment. You can set variables based on arguments, registry keys, or file input
SCShow or configure services (background processes).
SCHTASKSRun Task Scheduler. Schedule commands and programs to run on a computer.
SFCMicrosoft Resource Checker Examines the integrity of all protected system files and replaces incorrect versions with correct Microsoft ones
SHADOWMonitor another Remote Desktop Services session
COMPARTIRThe SHARE command is used to lock files and functions in MS-DOS
SXSTRACEWinSxs Tracking Utility
SHIFTChange position of replaceable modifiers in batch files
SHUTDOWNAllows local or remote shutdown, reboot, suspension and hibernation of a computer
SORTSort the results of a selected command, for example the results of a search with FIND
STARTStarts another window to run a program or command
SUBSTAssociate a path with a drive letter
SYSTEMINFODisplays specific equipment properties and settings
TAKEOWNThis tool allows the administrator to regain access to a denied file by reassigning ownership of the file.
TASKLISTShows all running tasks, including services
TASKKILLMS-DOS command that terminates or interrupts a running process or application
TCMSETUPThis DOS command is used to configure or disable the Telephony Application Programming Interface (TAPI) telephony client.
TIMEShow or set the system time
TIMEOUTThis utility accepts a timeout parameter to wait for a specified period of time (in seconds) or until a key is pressed. Also accepts a parameter to skip the keypress
TITLESets the window title of a CMD.EXE session
TRACERPTThe TRACERPT command is used to process real-time data or event trace logs
TRACERTIt allows you to track the route between one computer and another on the network, it is widely used to know where a data packet has stopped on the network.
TREEDOS command that graphically displays the directory structure of a drive or path
TSDISCONDisconnect a Remote Desktop session
TSKILLTerminate a process
TYPEDisplays the content of a text file
TYPEPERFTypeperf writes performance information to the command window or to a log file. To stop Typeperf press CTRL + C
TZUTILWindows time zone utility
UNLODCTRRemoves the counter name and long text for the specified repeating counter
WATCHShow Windows version
VERIFYTells Windows if it should check that the files are written correctly to a disk
VOLDisplays the volume label and serial number of the disk
VSSADMINVolume Shadow Copy Service administrative tool, images created by Windows for System Restore function.

For example, to list all existing images use: VSSADMIN list shadows

W32TMTool used to diagnose conflicts of the local computer or one on the network with the Windows Time service (Windows time) when trying to synchronize or update the system clock
WAITFORThis tool sends or waits for a signal to arrive in a system. If / S is not specified, the signal will be broadcast to all systems in a domain. If / S is specified the signal will only be sent to the specified domain
WBADMINBackup command line tool
WEVTUTILWindows event command line utility. Retrieve information about event logs and publishers, install and uninstall event manifests, run queries, and export, archive, and delete logs
WHEREDOS commands showing the location of files that match the search pattern. By default, the search is done in the current directory and in the paths specified by the PATH environment variable
WHOAMIThis utility can be used to obtain the destination of user name and group information along with the respective security identifiers (SID), privileges, login identifier (login ID) of the current user (access token ) on the local system. That is, who is the currently logged in user. If no modifier is specified, the tool displays username in NTLM format (domain \ username)
WINHLP32MS-DOS command that runs Windows help files that use the HLP extension
WINRMWindows Remote Management command-line tool Windows Remote Management (WinRM) is Microsoft's implementation of the WS-Management protocol, which provides a secure way to communicate with local and remote computers using Web services
WINRSDOS command that opens a command window in safe mode with a computer on the network
WINSATWindows System Assessment Tool (WinSAT)
WMICDisplays WMI information in the interactive command shell. It allows access to all kinds of information, both from the local computer or another on the network, lists all the hardware and software data available
XCOPYCopy files and directory trees

Practical usage examples for MS-DOS

Next I show you a couple of examples so you can see how CMD commands work in practice:

  • copy source_filedestination_file: Create a duplicate file of any file.
We have created a copy of the text file "fastboot.exe" called "fastboot2.txt". Made with PowerShell.
  • of the fastboot.txt: Deletes the selected file, in this case, the file named fastboot.txt.
  • shutdown –r –f –t 5: Computer restart after 5 seconds of waiting.
  • net user username / domain: Shows the properties of a domain user (last password change, account active or not, groups to which it belongs ...).
  • systeminfo: Shows all the properties of the computer such as the operating system, processor, computer name, physical and virtual memory, etc.
  • nbtstat –a ip_equipo: By entering the IP of a device you can obtain the name of the machine and the MAC

Use of special characters: asterisk and question mark

The special characters or wildcards, allow to use the same command with several files:

The asterisk * helps us to work with files with a similar name and serves to represent several characters. For example, the command DIR * .TXT it will show us all the files with the TXT extension located in the current folder.

The question mark it is very similar to the asterisk. The only difference is that the? only serves to replace a single character. For example, the command DIR FASTBOO? .TXTit will show us all the files that start with FASTBOO and have a TXT extension.

Establish connection with your Android device using ADB and Fastboot commands

We can also take advantage of an MS-DOS or Powershell terminal to communicate with an Android mobile or tablet from the PC, using a USB cable and a few commands. They are called ADB commands (Android Debug Bridge) and are used to carry out different tasks on Android systems, such as restarting the terminal, installing an application or entering the device's recovery mode.

Here we go over 10 of the most prominent ADB commands.

adb devicesIt is used to know if the device is communicating correctly with the PC. If everything has gone well, we will be shown a list of the connected devices with their respective serial number and status.
adb installWith this command line we can install applications in apk format on the device.
adb pushCommand to transfer files from the PC to the indicated path of the Android device.
adb pullCopy files from device to PC.
adb rebootRestart the Android device.
adb reboot-bootloaderReboot the device and load the bootloader.
adb reboot-recoveryReboot the device and load the recovery menu.
fastboot devicesConfirm if our Android has fastboot mode enabled and is connected.
adb shellCommand to view the content and permissions of the terminal files and folders. Allows you to change permissions.
adb logcatShows logs of recorded events.

You can see the operation of these commands in greater detail in the Basic guide to ADB commands for Android.

With regard to Fastboot, these are the commands that we can use:

update flash device from update.zip
flashallflash boot + recovery + system
flash []write a file to a flash partition
erase delete a flash partition
format format a flash partition
getvar show a variable from the bootloader
boot []download and boot the kernel
flash: raw boot []create a boot image and flash it
deviceslist of connected devices
continuecontinue with autostart
rebootrestart the device normally
reboot-bootloaderreboot device in bootloader
helpshow help message

You can get more details about how these commands work in the Fastboot for Android practical usage guide.

Another way to run CMD commands in Windows

All the CMD commands mentioned above can also be run from the Start box without having to open the MS-DOS console.

To do this, do the following:

➔ Write CMD / K command + option

This will execute the command with the option and leave the CMD window open.

➔ Write CMD / C command + option

This will execute the command with the option and close the CMD window when finished.

Two examples:

CMD / K IPCONFIG / ALL

CMD / C START //google.com

You have Telegram installed? Receive the best post of each day on our channel. Or if you prefer, find out everything from our Facebook page.

Recent Posts

$config[zx-auto] not found$config[zx-overlay] not found