Stop being scared of the black window: the 10 terminal commands every guide assumes
Every GitHub README skips the basics. Learn ten commands and three keyboard tricks in a practice folder, then finish by pulling a live weather forecast straight into your terminal.
- Your first real command from the internet: a live weather report in the terminal
- The first Level 0 lesson done (the terminal open, Git installed)
- 20 minutes
The 10 commands at a glance
See the whole kit before you use it, so every step after this has a home.
These ten cover almost every README on this site. You'll type every one of them in the next few steps. Grab the printable cheat sheet and keep it open while you work.
- 1. `pwd` shows the folder you're in
- 2. `cd` moves into a folder (
cd ..goes up one) - 3. `ls` lists what's in the folder
- 4. `mkdir` makes a new folder
- 5. `cat` prints a file to the screen
- 6. `cp` copies a file
- 7. `mv` moves or renames a file
- 8. `rm` deletes a file, permanently
- 9. `where.exe` (Mac:
which) finds where a program is installed - 10. `curl` fetches something from the internet (Windows: type
curl.exe)
Plus three keys: Tab to finish names, Up arrow for your last command, Ctrl + C to stop anything.
TipIn PowerShell,ls,cat,cp,mvandrmall work just like on a Mac. That's why most Mac-style README commands work on Windows too.
Commands 1 to 4: know where you are, and move around
Half of all beginner errors are running a command in the wrong folder.
Make a practice folder on your Desktop and move into it.
mkdir(4) makes a folder,cd(2) moves into it, andpwd(1) shows where you are:Windowscd $HOME\Desktop mkdir terminal-practice cd terminal-practice pwdMaccd ~/Desktop && mkdir terminal-practice && cd terminal-practice && pwdOutputPath ---- C:\Users\you\Desktop\terminal-practicePowerShell puts a small
Pathheading above the answer. A Mac prints just the path.cd ..goes up one foldercd ~(orcd $HOMEon Windows) jumps straight to your home folderls(3) lists what's in the current folder. Right now it's empty, so it prints nothing.
TipPowerShell also shows the folder you're in at the start of each line, likePS C:\Users\you\Desktop\terminal-practice>. Glance at it before running anything important.
pwd shows a path ending in terminal-practice.If it breakscd says the Desktop path doesn't exist.
cd says the Desktop path doesn't exist.
cd $HOME\OneDrive\Desktop, or skip the Desktop and run the lesson in your home folder with cd ~.Commands 5 to 7: make, read, copy and rename files
READMEs constantly ask you to create, copy or rename a settings file. This is how.
- Windows
mkdir notes cd notes "hello from the terminal" > hello.txt cat hello.txtMacmkdir notes && cd notes echo "hello from the terminal" > hello.txt cat hello.txtOutputhello from the terminal >sends text into a file.cat(5) prints a file. Now copy it withcp(6), which is exactly what a README means when it says "copy.env.exampleto.env". Then rename the copy withmv(7):Terminalcp hello.txt hello-copy.txt mv hello-copy.txt backup.txt lsOutputDirectory: C:\Users\you\Desktop\terminal-practice\notes Mode LastWriteTime Length Name ---- ------------- ------ ---- -a---- 12/10/2026 01:03 28 backup.txt -a---- 12/10/2026 01:03 28 hello.txt
Commands 1 to 7, plus the weather call from Command 10, run back to back in Windows PowerShell. On a Mac,
lsjust prints the two names.mvalso moves files between folders:mv backup.txt ..moves it up one level.TipIn Windows PowerShell,>writes the file as UTF-16, which a few tools misread. If a program later complains that your text file is the wrong encoding, recreate it withSet-Content hello.txt 'hello from the terminal' -Encoding utf8.
ls shows backup.txt and hello.txt, and no hello-copy.txt.Three keyboard tricks
These save you more time than any command.
- Tab: type the first few letters of a file or folder and press Tab to finish the name. Try
cat helthen Tab. - Up arrow: brings back your last command. Press it repeatedly to scroll through history, then Enter to run it again.
- Ctrl + C: stops whatever is running. When a tool is "stuck" or you want to close a server you started, this is the answer.
- Tab: type the first few letters of a file or folder and press Tab to finish the name. Try
Two extras:
cls(orclearon a Mac) wipes the screen, andexplorer .(oropen .on a Mac) opens the current folder in a normal window so you can see your files.Windowsexplorer .Macopen .TipIn PowerShell, pressing Tab again cycles to the next matching name. Keep pressing it to step through every file or folder that starts with what you typed, then Enter to run.
Command 9: fix "not recognised" for good
The most common error on this site, and the fix is almost always the same.
When you see
'git' is not recognisedorcommand not found, the terminal can't find the program. Check whether it's installed and where:Windowswhere.exe gitMacwhich gitOutputC:\Program Files\Git\cmd\git.exeIf that prints a path, the program is installed and the terminal can find it. If it prints nothing or an error, work down this list:
- Just installed it? Close every terminal and open a new one. New programs are only visible to new windows.
- Still not found? Restart the computer.
- Still not found? It isn't installed. Go back to Install anything from GitHub, step 3.
CarefulIn PowerShell, typewhere.exewith the.exe. Plainwheremeans something different there and silently prints nothing.
where.exe git (or which git) prints a path.Command 8: delete, with respect
Learn the one command to treat carefully, then clear away the practice folder.
cd $HOME\Desktop
rm -r -fo terminal-practicecd ~/Desktop && rm -rf terminal-practicerm deletes permanently: no Recycle Bin, no undo. Always check where you are with pwd first, and never run a delete command you've copied from somewhere you don't trust.ls on your Desktop no longer shows terminal-practice.Command 10: pull live weather into your terminal
Your first real command that talks to the internet, and the proof you're ready for every tool lesson.
curlfetches a web address and prints what comes back. Install guides use it all the time to download things. Point it at the free weather service wttr.in and swap London for your town:Windowscurl.exe "wttr.in/London?0T"Maccurl "wttr.in/London?0T"OutputWeather report: London Cloudy .--. +13(11) °C .-( ). ↖ 9 km/h (___.__)__) 10 km 0.0 mmYours shows today's weather where you are.
?0Tmeans "just right now, plain text". Drop it (curl.exe wttr.in/London) for a full three-day forecast, and press Up arrow to rerun it whenever you like.TipOn Windows, typecurl.exe, notcurl. In Windows PowerShell, plaincurlis a nickname for a different command and prints a wall of web-page details instead.TipWant it in one line?curl.exe "wttr.in/London?format=3"prints a single row likeLondon: partly cloudy +14°C, handy for a quick glance.
If it breaksIt says it can't resolve the host, or it times out.
It says it can't resolve the host, or it times out.
Your first wins
It works. Now do something with it.
Ask AI to explain any command before you run it
Before pasting a command from a README or a video, paste it here first:
Explain this terminal command in plain English, part by part. Tell me what it will change on my computer, whether anything is deleted or downloaded, and whether it's safe to run on Windows PowerShell:
[paste the command]Now install something real
You've got everything you need for the tool lessons. A good first one: run a ChatGPT-style AI on your own laptop.
Undo it cleanly
How to remove everything this mission installed.
The delete step already removed the practice folder. Nothing was installed, and the weather command only read from the internet and saved nothing.