Boost Your Productivity: Essential Windows DOS Commands You Should Know
This guide compiles the most useful Windows command‑line (DOS) commands—from checking system info and managing files to troubleshooting network issues, repairing disks, quickly launching tools, and fixing a frozen PC—so you can solve common problems without relying on the GUI.
Open CMD
Press Win + R, type cmd and press Enter, or search "Command Prompt" in the Start menu and launch it.
Inspect system configuration
systeminfo– displays hardware details, OS version and installed patches. ver – shows the Windows version (e.g., Win10 or Win11). hostname – shows the computer’s network name. whoami – shows the current user’s account type. echo %username% – prints the logged‑in username.
File operations
dir– list files in the current folder. cd D: – switch to drive D:; cd .. moves up one level. md NewFolder – create a new directory. rd OldFolder – delete an empty directory. copy 1.txt D:\Backup – copy a file to a backup folder. xcopy SourceFolder TargetFolder /E /I – copy an entire directory tree, including subfolders. del JunkFile.txt – delete a file (no Recycle Bin in CLI). ren OldName.txt NewName.txt – rename a file.
Network troubleshooting
ipconfig– view local IP address and gateway. ipconfig /all – detailed view including DNS servers and MAC address. ping www.baidu.com – test external connectivity; a "Reply" indicates success. ping 192.168.1.1 – ping the router first to locate where a problem lies. tracert www.baidu.com – trace the route packets take to a host. nslookup www.baidu.com – query DNS for the host’s IP address. netstat -ano – list open ports and owning process IDs (useful when the PC feels slow). netsh wlan show profiles – display all saved Wi‑Fi profiles; useful for retrieving forgotten passwords.
Disk utilities
chkdsk– scan the disk for errors. chkdsk /f – fix detected errors (requires admin rights). chkdsk /r – locate and recover bad sectors; useful for noisy drives. diskpart – launch the disk partitioning tool (create, delete, format partitions). format D: /fs:ntfs – format drive D: as NTFS (erases all data). fsutil fsinfo drives – list all drive letters present on the system.
Quick‑launch utilities
calc– Calculator. notepad – Text editor. mspaint – Paint. magnify – Magnifier. osk – On‑screen keyboard.
Recover from a frozen PC
tasklist– show all running processes. taskkill /PID 1234 /F – force‑terminate process 1234 without rebooting. services.msc – open Services manager to enable/disable background services. msconfig – System Configuration; disable unnecessary startup items for faster boot. regedit – Registry editor (modify system settings, but back up first). gpedit.msc – Group Policy editor (available on Pro/Enterprise editions). diskmgmt.msc – Disk Management for repartitioning without a PE environment.
Other common commands
cls– clear the screen. exit – leave the command prompt. help – display help for commands. shutdown /s 0 – immediate shutdown. shutdown /r 0 – immediate restart. shutdown /l – log off current user. start notepad.exe – launch Notepad (replace with any executable).
Typical daily troubleshooting relies on a handful of commands such as ipconfig, ping, tracert, taskkill, cd, copy, and chkdsk, enabling most Windows issues to be resolved without external assistance.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Java Tech Enthusiast
Sharing computer programming language knowledge, focusing on Java fundamentals, data structures, related tools, Spring Cloud, IntelliJ IDEA... Book giveaways, red‑packet rewards and other perks await!
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
