If you think CMD is dead, think again. Sure, PowerShell and WSL are the shiny new toys, but CMD still hides a treasure chest of hidden commands, admin tricks, and productivity hacks that many IT pros, hackers, and automation geeks quietly use every day.
In this guide, Iβll show you 55 CMD hidden gems β neatly grouped, explained, and with examples.
π System & File Management Hacks
π‘ Forget endless clicking in Explorer β these hacks let you manage files like a pro.
1. Tree View of Directories
tree C:\ /f
π Prints the full folder structure in tree format.
2. Compare Two Files Line by Line
fc file1.txt file2.txt
Great for spotting differences in config or log files.
3. Redirect Output to Clipboard
dir | clip
π Instantly copy command output to paste elsewhere.
4. Find Text Inside Files
findstr /s /i "error" *.log
Search through logs like a detective.
5. Check File Integrity (Hashes)
certutil -hashfile file.iso SHA256
Verifies downloads without extra tools.
6. Open Any Folder in Explorer
start .
7. Associate File Types
assoc .txt=txtfile
8. Batch Rename Files
ren *.txt *.bak
9. Move Files by Extension
move *.jpg D:\Photos
10. Check Free Disk Space
fsutil volume diskfree C:
βοΈ System Info & Performance Hacks
π» Dig deep into Windows internals without third-party apps.
11. Check Windows Version
winver
12. Full System Report
systeminfo
13. List Installed Drivers
driverquery
14. See Running Processes
tasklist
15. Kill a Process by Name
taskkill /IM notepad.exe /F
16. Check Uptime
net stats srv | find "Statistics since"
17. Battery Health Report
powercfg /batteryreport
Generates a neat HTML report.
18. Energy Efficiency Report
powercfg /energy
19. Boot Configuration
bcdedit
20. Installed Hotfixes
wmic qfe list brief
π Networking Hacks
π‘ CMD is still a beast for network troubleshooting.
21. Show Open Ports
netstat -an
22. DNS Cache Dump
ipconfig /displaydns
23. Flush DNS Cache
ipconfig /flushdns
24. IP & Adapter Details
ipconfig /all
25. Trace Route to a Site
tracert google.com
26. Continuous Ping
ping google.com -t
27. See Remote Logins
query user /server:hostname
28. Open Shares on a Computer
net view \\computername
29. Map a Network Drive
net use Z: \\server\share
30. Disconnect Drive
net use Z: /delete
π΅οΈ Ethical Hacking & Security Hacks
β‘ For red teamers, pentesters, and sysadmins keeping things tight.
31. List Saved Wi-Fi Profiles
netsh wlan show profiles
32. Reveal Wi-Fi Passwords
netsh wlan show profile name="WiFi-Name" key=clear
33. ARP Cache (LAN Devices)
arp -a
34. Local User Manager
lusrmgr.msc
35. Show All Accounts
net user
36. Add a New User
net user hacker P@ssw0rd /add
37. Add User to Admins
net localgroup administrators hacker /add
38. Check RDP Sessions
qwinsta
39. List All Services
sc query
40. Show Firewall Rules
netsh advfirewall firewall show rule name=all
β‘ Productivity & Automation Hacks
π Save time, automate workflows, prank coworkers.
41. Loop Command Until Stopped
:loop
echo Hello
timeout 1
goto loop
42. Time Command Execution
echo %time% & ping localhost -n 6 >nul & echo %time%
43. Set Environment Variable
setx MY_VAR HelloWorld
44. Show All Environment Vars
set
45. Open 10 Notepads at Once (prank)
for /l %x in (1, 1, 10) do start notepad.exe
46. Batch Download with CURL
curl -O https://example.com/file.zip
47. Generate Random Numbers
echo %random%
48. Write to File
echo Hello > file.txt
49. Append to File
echo World >> file.txt
50. Schedule a Task
schtasks /create /sc daily /tn "MyTask" /tr notepad.exe /st 09:00
π Fun & Hidden Tricks
Because every hacker loves easter eggs.
51. Play a Beep Sound
echo ^G
(Press CTRL+G
to insert the bell character.)
52. Matrix Effect
@echo off
color 0a
:loop
echo %random%%random%%random%%random%
goto loop
53. Colored CMD Window
color 1a
54. Change Title Bar Text
title Hacker Mode
55. Star Wars in ASCII (Hidden Telnet Gem)
telnet towel.blinkenlights.nl
Yes β the entire Star Wars IV movie in ASCII π
β Final Thoughts
CMD may look old-school, but itβs a hidden super-tool. From system management to network diagnostics and ethical hacking, it can still save you when PowerShell isnβt available.
π‘ Remember:
Automate more β because the less you click, the more you create.
Top comments (0)