TL;DR
The terminal is a text window for giving your computer direct commands. You only need about ten to move around, look at files, and manage folders. Learn these and the terminal goes from intimidating to genuinely useful.
What the terminal is
The terminal (also called the command line) is a window where you type commands instead of clicking. It feels old-school and a little intimidating, but it is just a faster, more direct way to tell your computer what to do - move around folders, create and delete files, run programs. Coding tools live here, so getting comfortable pays off quickly.
Moving around
- pwd - print working directory. Shows the folder you are currently in.
- ls - list the files and folders in your current location. (On Windows Command Prompt this is 'dir'.)
- cd <folder> - change directory - move into a folder.
- cd .. - move up one level, to the parent folder.
- cd ~ - jump to your home folder.
Working with files and folders
- mkdir <name> - make a new folder.
- touch <name> - create a new empty file (macOS and Linux).
- cp <source> <destination> - copy a file.
- mv <source> <destination> - move or rename a file.
- rm <name> - remove a file. Be careful: there is no recycle bin here, it is gone.
- cat <name> - print the contents of a file to the screen.
Handy extras
- clear - wipe the screen clean (the history is still there, just scrolled away).
- Up arrow - bring back your previous commands so you do not retype them.
- Tab - autocomplete a file or folder name you have started typing.
- Ctrl+C - stop whatever is currently running.
A quick note on systems: macOS and Linux share these commands. Windows Command Prompt uses a few different ones (dir instead of ls, for example), but if you use the Git Bash or WSL terminal on Windows, the commands above work there too.
Common questions
Is it dangerous to use the terminal?
For everyday commands like moving around and listing files, no. The one to respect is rm, which deletes permanently with no recycle bin. As long as you read a command before running it - especially deletes - the terminal is safe and hard to seriously break by accident.
How do I know which folder I am in?
Run pwd (print working directory) and it shows your current location. Use ls to see what is in that folder and cd to move around. Knowing where you are and how to move is most of what makes the terminal feel manageable.
Are these commands the same on Windows?
macOS and Linux share them exactly. Windows Command Prompt differs slightly (dir instead of ls, for example), but if you use Git Bash or WSL on Windows - common for coding - the commands in this guide work as written.
Do I really need the terminal if I am a beginner?
You need only a little, and it is worth it: most coding tools, including AI ones, run in or alongside the terminal. The ten or so commands here cover almost everything you will do early on, and you can look up the rest as needed.
Get the terminal commands cheat sheet
Get 650+ plug-and-play skills, MCPs & prompts, plus 5,000+ builders - $9/mo, cancel anytime.
Join the Club