The Command Prompt (cmd.exe) remains one of the most powerful built-in tools on Windows 10. While graphical interfaces dominate everyday use, a handful of command-line utilities can reveal system details, diagnose network issues, and enforce security policies faster than any menu. For beginners in programming and cybersecurity, learning these commands in a safe, authorized environment builds foundational skills for system administration and defensive security. Below is a curated A–Z reference of essential CMD commands, grouped by their primary function. Each entry includes the command, its purpose, and a practical example you can run on your own machine.

Getting Started Safely
Before exploring commands, open CMD as a standard user (press Win + R, type cmd, then press Enter). For administrative tasks, right‑click the Start button and select “Command Prompt (Admin)” or “Windows Terminal (Admin)”. Always test commands in a virtual machine or a dedicated lab environment first — never on production systems without permission. The examples below are for learning and legitimate system management only.
Network Diagnostics Commands (A–N)
| Command | Letter | Purpose | Example |
|---|---|---|---|
arp |
A | Display and modify the Address Resolution Protocol cache | arp -a |
getmac |
G | Show the MAC address of network adapters | getmac /v |
hostname |
H | Print the computer’s host name | hostname |
ipconfig |
I | Display IP configuration and release/renew DHCP leases | ipconfig /all |
nbtstat |
N | Show NetBIOS over TCP/IP statistics and name tables | nbtstat -n |
netstat |
N | Display active TCP connections, listening ports, and routing tables | netstat -an | findstr LISTEN |
nslookup |
N | Query DNS servers for domain name resolution | nslookup example.com |
System Information Commands (P–V)
| Command | Letter | Purpose | Example |
|---|---|---|---|
pathping |
P | Trace route and measure packet loss at each hop | pathping 8.8.8.8 |
ping |
P | Test reachability and round‑trip time to a host | ping -n 4 google.com |
route |
R | View and modify the IP routing table | route print |
systeminfo |
S | List detailed OS configuration, hotfixes, and hardware | systeminfo | findstr /B /C:"OS Name" |
tracert |
T | Trace the network path to a destination | tracert example.com |
ver |
V | Display the Windows version number | ver |

File and Disk Management Commands (C–W)
These commands help you navigate, copy, and verify file integrity — crucial for organizing code projects and auditing system files.
cd(C) – Change directory.cd C:UsersYourNameProjectschkdsk(C) – Check disk for errors.chkdsk C: /f(requires admin)copy(C) – Copy one or more files.copy report.txt D:Backupdel(D) – Delete files.del temp.logdir(D) – List directory contents.dir /w /pdiskpart(D) – Disk partition manager (use with caution in a lab).diskpartthenlist diskfc(F) – Compare two files.fc file1.txt file2.txtfind(F) – Search for a text string in files.find "error" log.txtmkdir(M) – Create a new directory.mkdir learning_cybersecmove(M) – Move or rename files.move old.txt new.txtren(R) – Rename a file.ren config.ini config.backuptype(T) – Display contents of a text file.type README.mdwmic(W) – Windows Management Instrumentation command line.wmic cpu get name
Security and Permissions Commands (C–I)
Use these to inspect and enforce security settings on your own system or in a licensed lab. Never run them on someone else’s machine without explicit authorization.
cipher(C) – Encrypt or decrypt files and folders.cipher /e secret_foldergpresult(G) – Display Resultant Set of Policy (RSoP).gpresult /rgpupdate(G) – Refresh local and Active Directory group policies.gpupdate /forceicacls(I) – Display and modify access control lists (ACLs) on files.icacls C:Important* /grant User:(R,W)net user(N) – Manage user accounts.net user(list users);net user username *(set password)whoami(W) – Show current user and security groups.whoami /groups
Process and Service Management (Q–T)
query(Q) – Display processes or sessions (formerlyqwinsta).query processschtasks(S) – Schedule tasks or view existing ones.schtasks /query /fo LISTtaskkill(T) – Terminate a running process by PID or name.taskkill /IM notepad.exe /Ftasklist(T) – List all running processes.tasklist /SVC
Practical Workflow: A Mini Security Audit
Combine a few of these commands to perform a quick, legal security check on your own Windows 10 machine:
- Open CMD as Administrator.
- Run
gpresult /rto verify applied group policies (look for unexpected restrictions). - Run
netstat -anand note any listening ports you don’t recognise. - Use
tasklist /SVCto see which processes host which services. - Check file permissions on sensitive directories with
icacls C:UsersYourName.
Document the output in a security log. If you spot anomalies (e.g., an unknown process listening on port 4444), research the process name in a sandboxed environment. For a deeper dive into network timeouts and connection states, the article on The Number 120 in Tech: From RS-485 to SSH Timeouts explains how default timeouts affect diagnostics.
Mastering these commands gives you a precise, scriptable way to inspect and protect your system. Start by running each command with the /? switch to read its built‑in help — that is the safest way to learn.
