Prontuario dei comandi
Every command the course uses, gathered in one place. You don't have to memorise any of it — come back and look it up whenever you're stuck. Each one has a plain-language explanation and an example.
🧭 Where am I, what's here
When the terminal opens, the first thing is figuring out which folder you're standing in and what's inside it.
- pwd
- Prints the full path of the folder you're currently in. Type it whenever you feel lost. — es. pwd
- ls
- Lists the files and sub-folders in the current folder. — es. ls
- ls -la
- Lists everything — including hidden files that start with a dot — one per line with details. — es. ls -la
- cd
- Walk into a folder (change directory). Follow it with the folder name. — es. cd photos
- cd ..
- Go up one level, back out to the parent folder. The two dots mean 'one level up'. — es. cd ..
- cd ~
- Jump straight back to your home folder, no matter how deep you've wandered. — es. cd ~
📁 Make and organise files
Create folders, make files, move things, delete things — the basics of tidying your drive.
- mkdir
- Create a new folder (make directory). — es. mkdir my-project
- mkdir -p
- Create nested folders in one go, including any missing levels in between. — es. mkdir -p src/assets/images
- touch
- Create an empty file (include the extension, e.g. .txt). — es. touch notes.txt
- cp
- Copy a file: cp source destination. The original stays; you get a duplicate. — es. cp report.pdf backup.pdf
- cp -r
- Copy a whole folder and everything inside it. The -r means 'recursively'. — es. cp -r photos photos-backup
- mv
- Move or rename: mv source destination. Renaming in place is just a same-folder move. — es. mv draft.txt final.txt
- rm
- Delete a file. ⚠️ There is no trash can here — deletes are permanent, so read twice before you hit Enter. — es. rm old-notes.txt
- rm -r
- Delete a whole folder and everything in it. Powerful — double-check the path. — es. rm -r temp-folder
👀 Look inside files
Peek at a file's contents or search for a keyword right in the terminal — no editor needed.
- cat
- Print a whole file's contents at once. Best for short files. — es. cat notes.txt
- head
- Show just the first lines of a file (10 by default). Use -n to pick how many. — es. head -n 5 server.log
- tail
- Show just the last lines — handy for checking the latest entries in a log. — es. tail -n 5 server.log
- wc
- Count lines, words and characters in a file. wc -l counts lines only. — es. wc -l server.log
- grep
- Search a file for lines containing some text, and print only the matching lines. — es. grep ERROR server.log
✍️ Print text and save output
Make the terminal print something, or pipe one command's output into the next or into a file.
- echo
- Print back whatever text you put after it. — es. echo Hello world
- >
- Write the output into a file, replacing whatever was there. — es. echo Hi > greeting.txt
- >>
- Append the output to the end of a file instead of overwriting it. — es. echo line 2 >> greeting.txt
- |
- Pipe: feed the output of the left command straight into the command on the right. — es. cat server.log | grep ERROR
🌿 Git — save points for your project
Git is like save points in a game: it records each version so you can rewind anytime — and collaborate with others.
- git init
- Start tracking the current folder with Git (create a new repository). — es. git init
- git status
- See which files changed and which aren't saved yet. The one you'll type most. — es. git status
- git add .
- Stage all your changes for the next save (the dot means 'everything'). — es. git add .
- git commit -m
- Make a save point with a short note describing what changed. — es. git commit -m "Add homepage"
- git log
- View the history of all your save points (who, when, what). — es. git log --oneline
- git branch
- List branches, or create a new one to experiment without touching the main line. — es. git branch new-feature
- git switch
- Switch to another branch. (Older guides use git checkout for this too.) — es. git switch new-feature
- git clone
- Download a full copy of an online project onto your own computer. — es. git clone https://github.com/user/repo.git
- git push
- Upload your local save points to the remote (e.g. GitHub). — es. git push
- git pull
- Fetch the latest changes from the remote and merge them locally. — es. git pull
⚙️ Install packages, run code
Install tools other people built and get a project running. Don't be scared when you see npm and node.
- node
- Run a JavaScript program with Node.js. — es. node app.js
- npm install
- Install all the packages a project needs (read from package.json). — es. npm install
- npm run
- Run a script defined in package.json, e.g. starting a dev server. — es. npm run dev
- python3
- Run a Python program. — es. python3 script.py
✨ Claude Code essentials
Launch Claude Code in the terminal, plus the slash commands you'll reach for most.
- claude
- Start Claude Code and drop into an interactive chat to start asking for help. — es. claude
- claude "..."
- Hand Claude a one-line task right away, without opening the chat first. — es. claude "fix the typo in README"
- /init
- Have Claude scan the whole project and write up a CLAUDE.md memory file. — es. /init
- /clear
- Wipe the current conversation's memory and start a fresh task cleanly. — es. /clear
- /help
- List every slash command Claude Code offers. Type it whenever you forget one. — es. /help
- /model
- Switch which Claude model to use (trading speed against capability). — es. /model
- Esc
- Press Esc to interrupt Claude immediately when it's heading the wrong way. — es. Esc
⌨️ Terminal shortcuts
A few tricks that make typing faster and less error-prone.
- ↑ / ↓
- Press the up/down arrows to scroll through commands you typed earlier — no retyping. — es. ↑
- Tab
- Half-way through a name? Hit Tab and the terminal auto-completes file and folder names. — es. cd pho⇥
- Ctrl + C
- Stop whatever command is currently running (use it when something is stuck). — es. Ctrl + C
- clear
- Clear the clutter off the screen for a clean slate (Ctrl + L does the same). — es. clear
⚠ L'esperienza interattiva completa richiede JavaScript. Attivalo e ricarica la pagina.
※ Questo è un progetto educativo indipendente — non è un prodotto ufficiale di Anthropic. Claude™ è un marchio di Anthropic, PBC.