DOS and Windows command line commands

Updated: 06/01/2025 by Computer Hope
Windows DOS command prompt window showing the echo command and a list of files.

Short for Microsoft Disk Operating System, MS-DOS is a non-graphical command line operating system created for IBM-compatible computers.

Microsoft introduced MS-DOS in August 1981, and it was last updated in 1994 with MS-DOS 6.22. Although the MS-DOS operating system is rarely used today, the command shell, commonly known as the Windows command line, is still widely used. Continue reading definition >>

Tip

If you're new to MS-DOS or the Windows command line, see: How to use the Windows command line (DOS).

DOS and Windows command line commands

The following table lists each of the MS-DOS and Windows command line commands with a brief description and its type. Selecting a command gives additional details about the command, its syntax, and examples.

Command Description Type
ansi.sys Defines functions that change display graphics, control cursor movement, and reassign keys. File
append Causes MS-DOS to look in other directories when editing a file or running a command. External
arp Displays, adds, and removes ARP (Address Resolution Protocol) information from network devices. External
assign Assign a drive letter to an alternate letter. External
assoc View the file associations. Internal
at Schedule a time to execute commands or programs. External
atmadm Lists connections and addresses seen by Windows ATM (Asynchronous Transfer Mode) call manager. Internal
attrib Display and change file attributes. External
backup Utility to back up data. External
batch Recovery console command that executes several commands in a file. Recovery
bcdedit Modify the boot configuration data store. External
bootcfg Recovery console command that allows a user to view, modify, and rebuild the boot.ini file. Recovery
bootrec Repair critical disk structures. Recovery
bootsect Update the master boot code for hard disk partitions. External
break Enable and disable Ctrl+C. Internal
cacls View and modify file ACLs. External
call Calls a batch file from another batch file. Internal
cd Changes directories. Internal
chcp Supplement the international keyboard and character set information. External
chdir Changes directories. Internal
chkdsk Check the hard drive running FAT (File Allocation Table) for errors. External
chkntfs Check the hard drive running NTFS (NTFS File System) for errors. External
choice Specify a listing of multiple options within a batch file. External
cipher Display or alter the encryption of NTFS directories. External
clip Redirect command line output to the Windows clipboard. External
cls Clears the screen. Internal
cmd Opens the command-line interpreter called command.com. Internal
color Change the foreground and background color of the MS-DOS window. Internal
command Opens the command interpreter. Internal
comp Compares files. External
compact Compresses and uncompress files. External
control Open Control Panel icons from the MS-DOS prompt. External
convert Convert FAT to NTFS. External
copy Copy one or more files to an alternate location. Internal
ctty Change the computer's input/output devices. Internal
date View or change the system's date. Internal
debug Debug utility to create assembly language programs to modify hardware settings. External
defrag Re-arrange the hard drive to improve performance. External
del Deletes one or more files. Internal
delete Deletes file. Internal
deltree Deletes one or more files or directories. External
dir List the contents of one or more directories. Internal
disable Disables Windows system services or drivers. Recovery
dism List, install, uninstall, and configure Windows binary images. External
diskcomp Compare a disk with another disk. External
diskcopy Copy the contents of one disk and place them on another disk. External
diskpart Command-line disk-partitioning utility. Recovery
dism Enumerating, installs, uninstalls, configures, and updates features and packages in Windows images. External
doskey View and execute commands that were run in the past. External
dosshell A GUI (Graphical User Interface) to help with early MS-DOS users. External
driverquery Display a list of installed device drivers. External
drivparm Enables overwrite of original device drivers. Internal
dumpchk View the Windows minidump files. External
echo Displays messages and enables and disables echo. Internal
edit View and edit files. External
edlin View and edit files. External
emm386 Load extended memory manager. External
enable Enable a disabled service or driver. Recovery
endlocal Stops the localization of the environment changes enabled by the setlocal command. Internal
erase Erase files from the computer. Internal
exit Exit from the command interpreter. Internal
expand Expand a Microsoft Windows file back to its original format. External
extract Extract files from the Microsoft Windows cabinets. External
fasthelp Displays a listing of MS-DOS commands and information about them. External
fc Compare files. External
fciv Check the MD5 or SHA-1 file checksum. External
fdisk Setup drive by creating and managing partitions on the hard drive. External
find Search for text within a file. External
findstr Searches for a string of text within a file. External
fixboot Writes a new boot sector. Recovery
fixmbr Writes a new boot record to a disk drive. Recovery
for Boolean used in batch files. Internal
forfiles Select one or more files and executes another command on them. External
format Erase and prepare a disk drive. External
ftp Connect and operate on an FTP (File Transfer Protocol) server. External
ftype Displays or modifies file types used in file extension associations. Recovery
goto Moves a batch file to a specific label or location. Internal
gpupdate Refresh a computer's local Group Policy. External
graftabl Show extended characters in graphics mode. External
help Display a listing of commands and a brief explanation. External
himem.sys Driver file for managing extended memory. File
hostname Display the hostname of the machine. External
icacls View and modify an ACL (Access Control List). External
if Allows for batch files to perform conditional processing. Internal
ifshlp.sys 32-bit file manager. File
ipconfig View network adapter settings and assigned values. External
keyb Change the layout of the keyboard. External
label Change the label of a disk drive. External
lh Load a device driver into high memory. Internal
listsvc Display the services and drivers. Recovery
loadfix Load a program above the first 64 k. External
loadhigh Load a device driver into high memory. Internal
lock Lock the hard drive. Internal
logoff Log off the current profile using the computer. External
logon List installations and enable administrator login. Recovery
map Displays the device name of a drive. Recovery
md Create a new directory. Internal
mem Display memory on the system. External
mkdir Create a new directory. Internal
mklink Creates a symbolic link. Internal
mode Modify the port or display settings. External
more Display one page at a time. External
move Move one or more files from one directory to another directory. Internal
msav Early Microsoft virus scanner. External
msbackup Back up data on the computer. External
mscdex Load and access the CD-ROM (Compact Disc Read-Only Memory). External
msd Computer diagnostics utility. External
msdos.sys MS-DOS configuration and boot file. File
msg Send messages to other network users. External
mwbackup Back up data on the computer. External
nbtstat Displays protocol statistics and current TCP/IP connections using NBT (NetBIOS over TCP/IP). External
net Update, fix, or view the network or network settings. External
netsh Configure dynamic and static network information from MS-DOS. External
netstat Display the TCP/IP network protocol statistics and information. External
nlsfunc Load country-specific information. External
nslookup Look up an IP address of a domain or host on a network. External
path View and modify the computer's path location. Internal
pathping View and locate locations of network latency. External
pause Command used in batch files to stop the processing of a command. Internal
ping Test and send information to another network computer or network device. External
popd Changes to the directory or network path stored by the pushd command. Internal
power Conserve power with computer portables. External
print Prints data to a printer port. External
prompt View and change the MS-DOS prompt. Internal
pushd Store a directory or network path in memory so it can be returned later. Internal
qbasic Open the QBasic. External
rd Removes an empty directory. Internal
reg Query, modify, and manipulate the Windows registry. External
ren Renames a file or directory. Internal
rename Renames a file or directory. Internal
replace Replace a file with another. External
rmdir Removes an empty directory. Internal
robocopy A robust file copy command for the Windows command line. External
route View and configure Windows network route tables. External
runas Enables users to run a program as a different user. External
sc Communicate with the Service Control Manager and services. External
scandisk Run the ScanDisk utility. External
scanreg Scan registry and recover registry from errors. External
schtasks Create, delete, query, change, run, and end scheduled tasks. External
set Change one variable or string to another. Internal
setlocal Enables local environments to be changed without affecting anything else. Internal
setver Change the MS-DOS version to trick older MS-DOS programs. External
sfc System file checker. External
share Installs support for file sharing and locking capabilities. External
shift Changes the position of replaceable parameters in a batch program. Internal
shutdown Shutdown the computer from the MS-DOS prompt. External
smartdrv Create a disk cache in conventional memory or extended memory. External
sort Sorts the input and displays the output to the screen. External
start Start a separate window in Windows from the MS-DOS prompt. Internal
subst Substitute a directory on your computer for another drive letter. External
switches Remove add functions from MS-DOS. Internal
sys Transfer system files to disk drive. External
systeminfo Display system information. External
systemroot Set the current directory as the root directory. Recovery
taskkill Kill a Windows task. External
tasklist Display a list of the running processes. External
telnet Telnet to another computer or device from the prompt. External
time View or modify the system time. Internal
title Change the title of their MS-DOS window. Internal
tracert Visually view a network packet route across a network. External
tree View a visual tree of the hard drive. External
tskill Kill a Windows task. External
type Display the contents of a file. Internal
undelete Undelete a file that was deleted. External
unformat Unformat a hard drive. External
unlock Unlock a disk drive. Internal
ver Display the version information. Internal
verify Enables or disables the feature to determine if files were written properly. Internal
vol Displays the volume information about the designated drive. Internal
wmic Query WMI (Windows Management Instrumentation) entries. External
xcopy Copy multiple files, directories, or drives from one location to another. External