Last updated 2026-11-24
Open a terminal and know where you are
The terminal is a text window where you type commands. On most systems, pwd shows the current folder, and ls lists its contents. On Windows, PowerShell uses Get-Location and Get-ChildItem for the same tasks. Learning these first helps you avoid running commands in the wrong place.
Move around and manage files
Use cd followed by a folder name to move into it, and cd .. to move up one level. Create folders with mkdir, copy with cp and move or rename with mv. Use tab completion to finish long names, which saves typing and reduces mistakes.
Read help and output carefully
Most commands have a help option, such as --help, that explains available flags. Read the output before pressing Enter on any command that changes files. Pipes, such as sending a list to a search command, let you combine simple tools into useful steps.
Be cautious with deletion
Commands such as rm or del remove files immediately, usually without a recycle bin. Before deleting, list the files with ls to see exactly what will match. Keep backups of important folders, and avoid running commands copied from untrusted sources without understanding each part.
Frequently asked questions
- Which terminal should I use?
- Use the built-in terminal on your system to start. macOS and Linux have Terminal or shell apps, and Windows offers PowerShell and Windows Terminal.
- Is the command line hard to learn?
- It takes practice, but a small set of commands covers most everyday tasks. Learn them gradually, and practise in a test folder first.
- Why would I use the command line instead of a window?
- Commands are faster for repeated tasks, can be saved as scripts and work on remote servers where graphical tools are not available.