Cheat sheets, install reference, troubleshooting, and copy-paste prompts
Use this page as a working companion while you go through the main guide. Every volatile Claude Code fact here is anchored to April 6, 2026.
Command cheat sheet
Navigation
| Command | What it means | What you should see |
|---|---|---|
pwd | Show the current working directory | A path like /Users/you or /home/you |
ls | List files and folders here | Names of items in the current folder |
cd folder-name | Move into a folder | No output, but pwd changes |
cd .. | Move up one folder level | No output, but pwd changes |
cd ~ | Return to your home directory | No output, but pwd becomes your home path |
mkdir name | Create a new folder | The folder appears when you run ls |
Git basics
| Command | What it means | What you should see |
|---|---|---|
git init | Turn this folder into a Git repo | A message that the repository was initialized |
git status | Show changed files and branch state | A summary of modified or untracked files |
git diff | Show exact line changes | Added and removed lines |
git add . | Stage all current changes | No output in normal success cases |
git commit -m "message" | Save a named checkpoint | A commit summary with changed file count |
git log --oneline | Show recent commit history | Short commit hashes and messages |
Claude Code basics
| Command | What it means | What you should see |
|---|---|---|
claude --version | Check whether Claude Code is installed | A version number |
claude doctor | Run the install health check | Diagnostic output about the current install |
claude | Start a normal Claude Code session | The Claude Code interface in your terminal |
claude --permission-mode plan | Start in plan-only mode | Claude can inspect and plan, not execute edits or commands |
/init | Create starter project memory | A generated or scaffolded CLAUDE.md flow |
/login | Change or refresh account login | Claude Code login flow |
Troubleshooting
claude: command not found
Close the terminal completely and open a new one. Run claude --version again. If it still fails, rerun the official installer for your operating system.
git: command not found
Git is not installed or the terminal session predates the install. Install Git, reopen the terminal, and rerun git --version.
code: command not found
On macOS, run Shell Command: Install 'code' command in PATH from the VS Code command palette, then restart Terminal. On Windows and Linux, reinstall VS Code with PATH integration enabled if needed.
PowerShell says && is invalid
You used the Windows Command Prompt installer line in PowerShell. Use the PowerShell installer instead: irm https://claude.ai/install.ps1 | iex.
WSL install confusion
If your goal is Bash-style development on Windows, run wsl --install from PowerShell as Administrator, restart, then finish Ubuntu first-time setup. Install Git inside WSL too, not just on the Windows side.
Claude Code launches but login still fails
The binary install and account entitlement are separate. Re-check whether your plan or funded Console account actually includes Claude Code access.
git commit complains about missing identity
Run:
Claude cannot see the files you expected
You probably launched Claude in the wrong folder. Run pwd and ls, make sure you are in the project root you meant to use, then start Claude again there.
Long pasted prompts behave strangely
Claude Code's terminal docs note several newline options. Try Ctrl + J, use \ plus Enter, or run /terminal-setup where supported. For very long content, put the material in a file and ask Claude to read the file instead of pasting everything inline.
You installed Claude Code with npm long ago
As of April 6, 2026, the official docs treat npm installation as deprecated. Migrate to the native installer:
Install matrix
| Platform | Terminal | Git | VS Code | Homebrew | Node.js | Python | Claude Code install | Special note |
|---|---|---|---|---|---|---|---|---|
| macOS | Terminal.app or iTerm2 | Often available via command line tools | Install from official site | install script |
brew install node |
brew install python |
curl -fsSL https://claude.ai/install.sh | bash |
Run the VS Code PATH command so code works |
| Ubuntu / Debian | System terminal | sudo apt install git |
Install from official site | N/A (use apt) |
sudo apt install nodejs npm |
sudo apt install python3 python3-pip |
curl -fsSL https://claude.ai/install.sh | bash |
Good fit for Bash-based learning |
| Windows native | PowerShell or Windows Terminal | Git for Windows required | Install from official site | N/A | winget install OpenJS.NodeJS.LTS |
winget install Python.Python.3.12 |
irm https://claude.ai/install.ps1 | iex |
Good if you want fewer moving parts |
| Windows with WSL | Ubuntu in WSL | Install Git inside WSL too | Install on Windows side | N/A (use apt) |
sudo apt install nodejs npm |
sudo apt install python3 python3-pip |
curl -fsSL https://claude.ai/install.sh | bash |
Best if you want the Bash workflow used in most tutorials |
This matrix reflects the official guidance checked on April 6, 2026. Re-check the official docs if you are reading this later.
Beginner prompt starter pack
Prompts to avoid
These prompts sound reasonable but create problems for beginners because they hand over too much control or create unmanageable scope.
"Rewrite everything"
This discards your working code and replaces it with something you cannot review incrementally. Always prefer small, targeted changes.
"Make it production-ready"
This is too vague and invites Claude to add complexity you do not understand yet: build tools, environment configs, error handling patterns, and more.
"Do whatever you think is best"
This removes you from the supervision loop. Claude works best when you define the goal and constraints. Giving it full discretion is the opposite of the safe workflow.
"Fix all the problems"
This creates unbounded scope. Claude may touch files you did not intend, introduce new patterns, or "fix" things that were not broken. Ask about one problem at a time.