Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Every Command in Command Prompt: A How-To Guide

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

There is no single list of "every" Command Prompt command because Windows ships with dozens of built-in commands and hundreds of utilities, and the set changes between Windows versions. What you can do is learn the commands that matter, find the full official list on your own PC, and run each one safely. This guide shows you how to open Command Prompt, discover commands, use the most useful ones, and avoid the mistakes that cause damage. No special tools are needed beyond a Windows PC and administrator access for some commands.

What You'll Need

  • A Windows 10 or Windows 11 PC (steps are for Windows; Mac and Linux use different shells).
  • An account with administrator rights for commands that change system settings.
  • A little caution: some commands delete files or change boot settings permanently.

Step-by-Step

  1. Open Command Prompt. Press the Windows key, type cmd, and press Enter. For administrator rights, right-click "Command Prompt" in the results and choose "Run as administrator". You can also press Windows+R, type cmd, and press Enter. Menu labels can differ slightly by Windows version and region.
  2. See the full command list. Type help and press Enter to see the built-in commands. For help on one command, type the command followed by /?, for example dir /?. This is the authoritative list for your exact Windows build.
  3. Learn navigation first. dir lists files and folders in the current directory. cd changes directory (for example cd Documents). cd .. goes up one level. cls clears the screen. These four commands let you move around without guessing.
  4. Manage files and folders. mkdir creates a folder, rmdir removes an empty folder, copy copies files, move moves them, and del deletes files. ren renames a file. Test these in a temporary folder before using them on important data.
  5. Check and repair your network. ipconfig shows your IP address and network settings. ipconfig /flushdns clears the DNS cache. ping tests whether a host is reachable (for example ping example.com). tracert shows the path to a host. netstat lists active connections. These are safe to run and useful for diagnosing Wi-Fi and internet problems.
  6. Inspect and manage the system. systeminfo displays OS version, memory, and installed updates. tasklist shows running processes; taskkill /PID followed by a process ID ends one. sfc /scannow checks and repairs Windows system files and needs administrator rights. chkdsk checks a disk; run it without options first to scan, and note that repair options can take a long time.
  7. Use shutdown and restart commands. shutdown /s /t 0 shuts down immediately, shutdown /r /t 0 restarts, and shutdown /a cancels a pending shutdown. The /t value is seconds of delay.
  8. Get help for any command. Append /? to almost any command to see its syntax and switches. For example, shutdown /? lists every option. This is how you learn commands without memorizing them.
  9. Use Tab completion and history. Press Tab to auto-complete file and folder names as you type. Press the Up arrow to recall previous commands. Both reduce typos, which matter most with delete commands.
  10. Close the window. Type exit and press Enter, or click the X. Commands stop when the window closes.

Common Mistakes

  • Running del or rmdir in the wrong folder. Always run dir first to confirm where you are.
  • Typing commands without administrator rights and getting "Access denied". Reopen Command Prompt as administrator.
  • Using chkdsk /f or sfc /scannow casually. These change system files and can take a long time; run them only when you suspect a problem.
  • Forgetting that shutdown /s closes everything without saving. Save your work before using shutdown commands.
  • Assuming Mac or Linux commands work. ls, grep, and sudo are not Command Prompt commands.

Tips

  • Use help command or command /? before running anything unfamiliar.
  • Work in a test folder when learning file commands.
  • Copy long paths from File Explorer instead of typing them.
  • Keep a note of commands you use often; Command Prompt does not save a favorites list.
  • If a command seems to hang, press Ctrl+C to stop it.

Troubleshooting

  • "'command' is not recognized". Check spelling, or the command may not exist in your Windows version. Run help to see what is available.
  • "Access denied". Reopen Command Prompt as administrator.
  • Command runs but nothing happens. Some commands (like ping) wait for a response; press Ctrl+C to stop. Others need a target, such as a file name or IP address.
  • Network commands show wrong results. Run ipconfig /release then ipconfig /renew to refresh your IP address, then test again.
  • System file checker finds errors it cannot fix. Note the message and check Windows Update; some repairs require a restart or installation media.

Frequently Asked Questions

How do I see every command available?

Type help at the prompt for built-in commands. For a specific command, type command /?. The list depends on your Windows version.

Are Command Prompt commands dangerous?

Some are. del, rmdir, format, and chkdsk /f can delete data or change system files. Read the help text before running them.

Can I use Command Prompt on a Mac?

No. Mac uses Terminal with Unix commands. The commands in this guide are for Windows.

Why does a command say "Access denied"?

It needs administrator rights. Close the window, right-click Command Prompt, and choose "Run as administrator".

How do I stop a command that is running?

Press Ctrl+C. For commands that ignore Ctrl+C, close the window.

Do I need to memorize commands?

No. Use help and /? to look up syntax, and Tab completion to avoid typing full paths.