Home » Tech Tips » Windows » 100 Popular Windows Commands (MS-DOS Commands)

100 Popular Windows Commands (MS-DOS Commands)

MS-DOS or Microsoft Disk Operating System commands are popular among those using Windows from the beginning. They are powerful tools for system administration, troubleshooting, and automating tasks allowing users to interact directly with the operating system, bypassing the graphical user interface (GUI). Though some DOS commands were obsolete and removed, most of them will still work and are called Windows commands. This article provides a detailed overview of 100 popular Windows commands with their purpose and examples, organized in a user-friendly table.

Top 100 Windows Commands

Below is a table listing each command with its purpose and an example. All these commands are tested in latest Windows 11 version.

CommandPurposeExample
arpDisplays or modifies the Address Resolution Protocol table.arp -a to display current entries
assocView or change file associations.assoc .jpg=jpegfile
attribDisplays or changes file attributes.attrib +r file.txt sets read-only attribute
callCalls a batch file from another batch file.call myscript.bat
cdChanges the current directory.cd C:\Windows\System32
chdirDisplays or changes the current directory.chdir C:\Windows
chkdskChecks the integrity of a disk and fixes errors.chkdsk C: /f will fix disk errors
chkntfsDisplays or modifies automatic disk check at startup.chkntfs /d to restor default behavior
cipherEncrypts or decrypts files and directories.cipher /e file.txt
clipCopies the output of a command to the clipboard.dir | clip will copy the current directory to clipboard
clsClears the Command Prompt screen.cls
cmdkeyManages stored usernames and passwords.cmdkey /list
colorChanges the Command Prompt baground and fireground colors.color 0A (0 – black background and A – Light Green foreground)
compCompares the contents of two files.comp file1.txt file2.txt
controlOpens the Control Panel.control
copyCopies files from one location to another.copy file.txt D:\Backup\
dateDisplays or sets the system date.date /t displays current date
delDeletes one or more files.del file.txt
dirLists files and directories in the current directory.dir C:\Users\John\Documents
diskperfEnables or disables disk performance counters.diskperf -y sets all performance counters when restarted
diskusageDisplays disk usage for a directory or drive.diskusage C:\ /h
doskeyEdits command lines or creates macros.doskey list=dir /b
driverqueryLists installed drivers and details.driverquery /v displays verbos output
echoDisplays a message or turns on/off command echoing.echo Hello, World!
endlocalEnds localization of environment changes.endlocal
exitExits the Command Prompt.exit
explorerOpens File Explorer.explorer C:\
fcCompares two files and shows differences.fc file1.txt file2.txt
findSearches for text in a file.find “error” log.txt
findstrSearches for a string in files.findstr “error” log.txt
forExecutes a command for each item in a list.for %i in (*.txt) do echo %i
formatFormats a disk for use with Windows.format E: /fs:NTFS
fsutilPerforms tasks related to file systems.fsutil dirty query C:
ftypeDisplays or changes file types.ftype txtfile=notepad.exe %1
getmacDisplays the MAC address of network adapters.getmac
gotoDirects batch execution to a labeled line.goto start
gpresultDisplays Group Policy settings and results.gpresult /R
gpupdateUpdates Group Policy settings.gpupdate /force
hostnameDisplays the computer’s hostname.hostname
icaclsDisplays or modifies access control lists.icacls file.txt /grant <username>:F
ifPerforms conditional processing in batch scripts.if exist file.txt echo File found!
ipconfigDisplays network configuration details.ipconfig
labelChanges the label of a disk.label C: Backup
lodctrUpdates or displays performance counter settings.lodctr /r will rebuild performance counter settings from system backup
mdCreates a new directory.md NewFolder
mkdirCreates a new directory.mkdir NewFolder
modeConfigures system devices.mode con:cols=120 lines=30
moveMoves files from one directory to another.move file.txt D:\NewFolder
mstscOpens the Remote Desktop Connection tool.mstsc /v:192.168.1.100
netManages network resources.net view
net sessionDisplays information about server sessions.net session
net shareManages shared resources.net share Documents=C:\Docs
net userManages user accounts.net user displays all user accounts
netshConfigures network settings.netsh wlan show profiles
netstatDisplays network statistics and connections.netstat -an
notepadOpens Notepad text editor.notepad file.txt
nslookupQueries DNS to obtain domain name information.nslookup google.com
pathDisplays or modifies the system path.path
pathpingCombines ping and tracert to show network performance.pathping www.google.com
pausePauses the execution of a script.pause
pingTests connectivity to a network host.ping 8.8.8.8
popdRestores the previous directory.popd
powercfgConfigures power settings.powercfg /hibernate on
powershellOpens the Windows PowerShell interface within Command Prompt.powershell (use exit to return to Command Prompt)
pushdSaves the current directory and changes to another.pushd D:\Projects
queryDisplays information about system services, sessions, or processes.query user
rdRemoves an empty directory.rd OldFolder
reagentcConfigures the Windows Recovery Environment.reagentc /info
renRenames a file or directory.ren file.txt newname.txt
replaceReplaces files.replace file1.txt C:\Backup\file1.txt
rmdirRemoves a directory.rmdir /S C:\MyFolder – removes all files and delete MyFolder
robocopyRobust file copy for advanced operations.robocopy C:\Source D:\Destination /MIR
scManages Windows services.sc query spooler
schtasksSchedules tasks.schtasks /create /tn “Backup” /sc daily /tr “backup.exe”
setDisplays or sets environment variables.set PATH=C:\NewPath;%PATH%
setlocalBegins localization of environment changes.setlocal ENABLEDELAYEDEXPANSION
setxSets environment variables permanently.setx PATH C:\NewPath
sfcScans and repairs system files.sfc /scannow
shutdownShuts down or restarts the computer.shutdown /r /t 60 will restart after 60 seconds
startOpens a new Command Prompt window or program.start notepad.exe
substMaps a directory to a drive letter.subst X: C:\Users\John
systeminfoDisplays detailed system information.systeminfo
takeownTakes ownership of a file or directory.takeown /f file.txt
taskkillEnds a running process.taskkill /IM notepad.exe
tasklistDisplays a list of running processes.tasklist
taskmgrOpens the Task Manager.taskmgr
timeDisplays or sets the system time.time /t shows current time
timeoutWaits for a specified amount of time.timeout /t 10
titleSets the Command Prompt window title.title My Command Prompt
tpm.mscLaunches the Trusted Platform Module management console.tpm.msc
tracertTraces the route to a network host.tracert www.google.com
treeDisplays the directory structure as a tree.tree C:\
typeDisplays the contents of a text file.type file.txt
verDisplays the Windows version.ver
volDisplays the volume label of a drive.vol C:
wevtutilManages event logs and publishers.wevtutil query-events System
whereLocates and displays files in the PATH.where notepad
whoamiDisplays the current username.whoami
wmicExecutes Windows Management Instrumentation commands (deprecated but useful).wmic cpu get name
xcopyCopies files and directories, including subdirectories.xcopy C:\Files D:\Backup /E

How to Use These Commands?

Windows 11 has a new Terminal app making it easier to switch between Command Prompt and PowerShell command-line interfaces. These commands are tested and to be triggered from Command Prompt, though they will still work from PowerShell.

  • Right-click on the Start menu icon or press “Windows Logo + X” keys to open the power user menu.
Open Terminal Admin Mode
Open Terminal Admin Mode
  • Select “Terminal (Admin)” from the list of menu items that appears. You will be prompted with User Account Control dialog box and press “Yes” to allow access.
  • Make sure you are in “Administrator: Command Prompt” interface. otherwise, click the small arrow on the title bar and select “Command Prompt” from the list (or press “Control + Shift + 2” keys).
Windows Terminal App
Windows Terminal App

Always back up data before running commands that modify files or system settings. Use the /? switch to learn more about any command – for example, xcopy /? If you have wrongly executed a command that runs for longer time, press “Control + C” keys terminate it and return back to the prompt.

Note that you can also use most of the Run commands from Terminal app.

Some Example Usages

For changing the title of current Command Prompt tab, simply type title My Commands and press enter. This will change the title to “My Commands”.

Change Command Prompt Title
Change Command Prompt Title

Use color 5b command to change the background to purple and text color to light aqua.

Command Prompt Color Change
Command Prompt Color Change

Use ipconfig command to get your system’s IP address, run chkdsk command to fix hard drive error, control or notepad commands to open Control Panel or Notepad app.

ipconfig Command
ipconfig Command

Why Windows Commands are Essential?

Windows commands simplify many complex tasks, especially for advanced users and IT professionals. They help in:

  • Automating tasks: Repetitive processes can be scripted.
  • Troubleshooting: System issues can be diagnosed and resolved faster.
  • Managing files and directories: Easier handling of large datasets.
  • Network management: Efficient configuration and testing.

Whether you’re a beginner or an advanced user, this list will serve as an invaluable reference.

Leave a Comment

Your email address will not be published. Required fields are marked *