Foundations
How to Install Claude Code
Zero to your first real prompt in 10 minutes. Mac, Windows, Linux. No experience required.
On this page (21 sections)
Claude Code lives on your computer and works directly with your files. One install, then you talk to it in plain English. This gets you there.
What you need: A computer (Mac, Windows, or Linux), internet, and a paid Anthropic account.
Using VS Code or JetBrains? Search "Claude Code" in your editor's extension marketplace. No terminal needed. The rest of this page covers the CLI install for people who want it.
Never Used a Terminal Before?
No shame here. A terminal (also called "command line" or "shell") is just a text window where you type commands instead of clicking buttons. On Mac it's called Terminal, on Windows it's PowerShell, on Linux it's usually Terminal too.
Three commands are all you need to know:
| Command | What it does | Example |
|---|---|---|
cd | Move into a folder | cd Documents |
mkdir | Create a new folder | mkdir my-project |
ls | See what's in the current folder | ls |
Everything else, you can ask Claude to do for you once it's running.
One more thing you'll see later: "environment variables." Think of those as settings stored on your computer that programs can read. Like a sticky note that says API_KEY=abc123. You won't need them during installation. Claude Code can set them up for you when the time comes.
Install Node.js First
Claude Code runs on Node.js, which is basically the engine that makes CLI tools like this work on your machine. You need version 18 or newer.
Check if you already have it. Open your terminal and type:
node --versionIf you see something like v18.17.0 or higher, skip ahead. If you get an error, go to nodejs.org and download the LTS version. Run the installer, follow the prompts. Two minutes.
macOS
Step 1: Open Terminal
Press Cmd + Space, type Terminal, hit Enter. A window with a text prompt appears.
Step 2: Install Claude Code
Paste this and press Enter:
npm install -g @anthropic-ai/claude-codedownloads and installs Claude Code globally. You'll see progress text scroll by, then it stops.
Troubleshooting on Mac
"npm: command not found" means Node.js isn't installed. Download from nodejs.org or, if you use :
brew install node"EACCES: permission denied" is a permissions issue. Quick fix:
sudo npm install -g @anthropic-ai/claude-codeType your Mac password when asked. Nothing will appear on screen while you type. That's normal.
For a permanent fix that avoids sudo in the future, see the troubleshooting page.
Windows
Two options. Direct install is faster. WSL gives you a better experience long-term.
Option A: Direct Install (Fastest)
Open PowerShell. Press Windows key, type PowerShell, click "Run as Administrator."
Paste this and press Enter:
npm install -g @anthropic-ai/claude-codeIf you get a permission error, make sure you opened PowerShell as Administrator.
Option B: WSL (Better for Daily Use)
WSL (Windows Subsystem for Linux) gives you a Linux environment inside Windows. More development tools are designed for Linux and Mac, so things tend to work more smoothly here.
Step 1: Open PowerShell as Administrator and run:
wsl --installRestart when prompted.
Step 2: After restarting, open the Ubuntu app from your Start menu. It finishes setup and asks for a username and password.
Step 3: Inside Ubuntu, install Node.js and Claude Code:
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
npm install -g @anthropic-ai/claude-codeLinux
Step 1: Open your terminal
Most Linux distributions use Ctrl + Alt + T.
Step 2: Install Claude Code
npm install -g @anthropic-ai/claude-codeTroubleshooting on Linux
"EACCES: permission denied" is common. Fix npm's default directory instead of using sudo:
mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrcThen run the install command again:
npm install -g @anthropic-ai/claude-codeVerify It Worked
On any operating system:
claude --versionYou should see a version number. Error instead? Check the troubleshooting page.
Log In and Start
Step 1: Launch Claude Code
Navigate to any folder and type:
claudeFirst time, it walks you through logging in with your Anthropic account.
Step 2: You Need a Paid Plan
Claude Code requires an active subscription. Free tier doesn't include it.
- Claude Pro ($20/month): generous daily limit, good for most people
- Claude Max ($100/month): significantly more capacity for heavy use
Sign up at claude.ai if you haven't yet.
Your First Prompt
Let's confirm everything works. Navigate somewhere to experiment:
mkdir claude-test && cd claude-test
claudeOnce Claude Code starts, type:
Create a simple HTML page that says Hello World with some nice stylingWatch what happens. Claude Code creates a file, writes HTML into it, tells you what it did.
To see the result in your browser:
- Mac:
open index.htmlin terminal - Windows:
start index.htmlin PowerShell - Linux:
xdg-open index.html - Or just find the file in your file manager and double-click it
You should see a styled "Hello World" page. That's Claude Code doing real work.
Shortcut: You can also just ask:
"open the file in my browser". It knows how.
What's Next
You're in. Here's where to go from here:
- Full Guided Setup for configuring Claude Code for real projects
- CLAUDE.md Guide so Claude Code remembers your preferences between sessions
- Glossary for any terms you don't recognize
Not Ready for the Terminal?
Completely fine. Lovable lets you build apps with AI using a visual interface. No terminal, no code. Come back to Claude Code whenever you're ready. (20% off your first month with that link.)
Still Stuck?
- Troubleshooting page for common fixes
- Anthropic's official documentation for the latest
- Claude Code GitHub issues if others hit the same problem
New guides, when they ship
One email, roughly weekly. CLAUDE.md templates, workflows I actually use, and the cut-for-length stuff that does not make the public guides. One-click unsubscribe.
Or follow on Substack