Loading ...

📚 Chapters

Must Know cmd Commands For Everyone

✍️ By Arun Kumar | 11/14/2025

Here’s a complete list of must-know CMD (Command Prompt) commands — grouped by category — useful for everyone whether you are developers, IT pros, ethical hackers or students.




Basic Navigation Commands

CommandDescription
dirLists files and folders in the current directory
cd <folder>Changes the directory
cd ..Moves up one directory
cd /Moves to the root directory
clsClears the screen
exitCloses the Command Prompt
echo <text>Displays a line of text
helpLists all available commands
help <command>Shows detailed info for a command



File & Folder Management

CommandDescription
md <folder> or mkdir <folder>Creates a new directory
rd <folder> or rmdir <folder>Removes an empty directory
del <file>Deletes a file
copy <source> <destination>Copies files
xcopy <source> <destination> /s /eCopies directories including subfolders
move <source> <destination>Moves or renames files
rename <old> <new>Renames a file or folder
type <file>Displays file content
attribDisplays or changes file attributes
treeShows folder structure graphically



System Information & Management

CommandDescription
systeminfoDisplays detailed system information
hostnameDisplays computer name
verShows Windows version
tasklistLists all running processes
taskkill /IM <processname> /FKills a running process
wmic cpu get nameDisplays CPU name
wmic logicaldisk get size,freespace,captionShows disk space
driverqueryLists all installed drivers
setDisplays or sets environment variables
pathDisplays or sets search path for executables



Networking Commands

CommandDescription
ipconfigDisplays IP address, subnet, and gateway
ipconfig /allShows detailed network info
ping <hostname>Tests connectivity
tracert <hostname>Traces route to a host
netstatDisplays network connections and ports
nslookup <domain>Looks up DNS info for a domain
getmacShows MAC address
arp -aDisplays ARP cache
netsh wlan show profilesLists saved Wi-Fi networks
netsh wlan show profile name="<SSID>" key=clearShows Wi-Fi password
net useShows shared network resources
net viewLists computers on the same network



User & Access Control

CommandDescription
net userLists all user accounts
net user <username>Displays user details
net user <username> <password> /addCreates new user
net localgroup administrators <username> /addAdds user to admin group
net user <username> /deleteDeletes user
whoamiDisplays current logged-in user
runas /user:<username> cmdRuns a command as another user


Disk & File Utilities

CommandDescription
chkdskChecks disk for errors
diskpartOpens disk partition tool
format <drive>:Formats a drive
labelChanges drive label
volDisplays volume label and serial number
sfc /scannowScans and repairs system files
defrag <drive>:Defragments a disk



Advanced / Admin Commands

CommandDescription
powershellOpens PowerShell
gpupdate /forceRefreshes group policies
shutdown /s /t 0Shuts down computer immediately
shutdown /r /t 0Restarts computer
cipher /w:<drive>Wipes deleted data securely
net startLists running Windows services
net stop <service>Stops a service
sc queryLists all services
taskschd.mscOpens Task Scheduler
regeditOpens Windows Registry Editor



Ethical Hacking / Diagnostic (For Learning)

CommandDescription
netstat -anoShows open ports and process IDs
ipconfig /displaydnsDisplays cached DNS entries
arp -aShows local network connections
route printDisplays routing table
nslookup -type=mx gmail.comFinds mail servers of a domain
tracert google.comTrace network hops
`systeminfofind "Time Zone"`



Useful Shortcuts

ShortcutDescription
↑ / ↓Scroll through command history
TabAuto-complete file or folder names
Ctrl + CStop running command
Ctrl + ASelect all text in CMD
Ctrl + MEnables mark mode (select text manually)

-------------------------------------------------------------------------------------------------------------------------------------------------------

List of common Windows tasks that can be done both from the CMD and from the graphical interface (UI):-

1. Creating or Deleting Files/Folders

TaskUI MethodCMD Command
Create a folderRight-click → New → Foldermkdir MyFolder
Delete a folderRight-click → Deletermdir /s /q MyFolder
Create a fileRight-click → New → Text Documentecho Hello > file.txt
Delete a fileSelect → Deletedel file.txt


2. Checking Network Connectivity
TaskUI MethodCMD Command
Check Internet connectionOpen Settings → Network Statusping google.com
View IP addressControl Panel → Network → Detailsipconfig
View all network connectionsNetwork & Sharing Centernetstat -an


3. Opening Applications
TaskUI MethodCMD Command
Open NotepadSearch → Notepadnotepad
Open CalculatorSearch → Calculatorcalc
Open PaintSearch → Paintmspaint
Open Control PanelClick Start → Control Panelcontrol

4. Searching Files or Folders

TaskUI MethodCMD Command
Search file by nameFile Explorer search bardir filename.txt /s
Search files by extensionFile Explorer filtersdir *.jpg /s



💬 Comments

logo

Comments (0)

No comments yet. Be the first to share your thoughts!