1.1

Installing Claude Code

Getting Claude Code running on your Mac

🔧 Setup ⏱️ ~15 minutes

You've got terminal skills. Now let's install the tool that makes them useful. Claude Code installation involves a few steps, but we'll walk through each one.

📋 Before You Start

💻 System Requirements

  • macOS 10.15 (Catalina) or later
  • At least 500MB of free disk space
  • Internet connection for installation
  • Terminal app (comes with your Mac)
  • Claude account with Pro subscription or API access

💡 Account Note

Claude Code requires a Claude Pro subscription ($20/month) or API credits. If you're not sure whether it's worth it, you can sign up for Pro, try it for a month, and cancel if it's not for you.

📥

Installation Checklist

Quick reference guide for installing Claude Code

📄 Preview PDF
Download PDF

🔨 Step 1: Install Node.js

Claude Code runs on Node.js, a platform that lets JavaScript run outside a browser. You might already have it installed.

Check by opening Terminal and typing:

node --version

If you see a version number (like v20.10.0), you're good—skip to Step 2.

If you see "command not found," you need to install Node.js:

Node.js Installation Steps

Download the LTS (Long Term Support) version
Run the installer and follow the prompts
Close and reopen Terminal
Run node --version again to confirm

📦 Step 2: Install Claude Code

With Node.js installed, you can install Claude Code using npm (Node Package Manager, which comes with Node.js).

In Terminal, run:

npm install -g @anthropic-ai/claude-code

The -g flag means "global"—it installs Claude Code so you can use it from any folder.

This might take a minute. When it's done, verify the installation:

claude --version

You should see a version number. If you do, Claude Code is installed!

⚡ Pro Tip

If you see errors about permissions, try running the install command with sudo: sudo npm install -g @anthropic-ai/claude-code. You'll need to enter your Mac password. This gives the installer admin privileges to write to system directories.

🔑 Step 3: Authenticate

Claude Code needs to connect to your Claude account. Run:

claude

The first time you run this, it will open a browser window asking you to log in to Claude. Sign in with your Claude account, authorize Claude Code, and you'll be redirected back.

In your terminal, you should see a welcome message indicating you're connected.

✅ Step 4: Verify Everything Works

Let's make sure it's all working. Navigate to a test folder:

cd ~/Documents/Projects/terminal-practice

(Or wherever you created your practice folder in Module 0.)

Then start Claude Code:

claude

You should see Claude Code start up with a prompt waiting for your input. Type something simple like:

Hi! Are you working?

If Claude responds, congratulations—you're ready to go!

Type /exit or press Ctrl+C to quit Claude Code for now.

✅ Success Check

You'll know you've got this when: you can run claude from any folder in Terminal and see Claude Code start up without errors.

✨ What Just Happened

You installed a tool that gives Claude direct access to your file system. When you run claude in a folder, Claude can read files there, create new ones, run code, and more. The terminal is now your interface for working with an AI that can actually do things.

🚨 Troubleshooting

"command not found: claude"

The installation didn't add Claude to your path. Try closing and reopening Terminal. If that doesn't work, you may need to add npm's global bin directory to your PATH. Run npm config get prefix to find where npm installs global packages.

"Authentication failed"

Make sure you're logged into Claude with an account that has Claude Pro or API access. Free accounts may have limited Claude Code access. Check your subscription status at claude.ai/settings.

"npm ERR! code EACCES"

This is a permissions error. The safest solution is to configure npm to use a different directory. See npm's guide to fixing permissions. Alternatively, use sudo (less ideal).

"Something else went wrong"

Check Anthropic's official documentation at docs.anthropic.com for the latest installation instructions. Things can change, and the official docs are always up to date.

📚 Resources & Further Reading

💭 Pause & Reflect

Before moving on, take a moment to consider:

  • How did the installation process compare to your expectations?
  • Which step felt most challenging? Why?
  • What will you try first once you start using Claude Code?

🎯 Claude Code Installed!

You've got the tool. Next, let's learn how to talk to it.

Topic 1.1 Complete • Up Next: 1.2 – Your First Conversation