Where to begin
Read them roughly in this order.
- dir lists what is in a folder. Nothing can go wrong with it.
- cd, mkdir and rmdir move you between folders and make new ones. This page also explains paths and drive letters.
- copy, move and ren do what dragging does in File Explorer.
- type, find and findstr read text files and search inside them.
- del deletes. Read the whole page before using it. The Command Prompt has no Recycle Bin.
After those five, the rest can be read as needed: tree and attrib for folder structure and hidden files, ipconfig and ping when the internet misbehaves, tasklist and taskkill for a frozen program, echo, set and PATH for variables, systeminfo and shutdown, and batch files for saving a sequence of commands.
Things every Windows command shares
- Help is built in. Put
/?after any command to see its options:copy /?. - Options start with a slash, as in
dir /b. - Capital and small letters do not matter in commands or file names.
- Names with spaces need double quotation marks.
- Ctrl + C stops a command that is running.
- The up arrow recalls earlier commands, and Tab completes file names.
Opening the Command Prompt
Press the Windows key, type cmd and press Enter. To open it already in a particular folder, type cmd in the address bar of a File Explorer window showing that folder.
"Run as administrator" gives a Command Prompt that can change system settings and protected files. Do not use it for everyday work. A mistake there has more room to do harm.
This is an independent learning site. It is not connected with Microsoft, Apple or any Linux distribution. Windows, macOS and other names belong to their owners. Try commands first in a practice folder, never on files you cannot afford to lose.