Terminal guide · macOS
Install Claude Code on your Mac — the complete guide
Never used a terminal? No problem. This guide walks you through every step — from opening a terminal window to running your first command with Claude Code — in plain, clear language.
Installing to ~/.local/bin…
✓ Claude Code successfully installed!
Before you begin
System requirements
Make sure your Mac meets these requirements before installing Claude Code.
Click the Apple logo in the top-left corner of your screen, then choose About This Mac. The version number is listed there.
Step by step
Complete installation guide
Follow these steps in order. Each one builds on the last.
-
1
Open Terminal on your Mac
The Terminal is a text-based way to control your Mac. It comes pre-installed — you don't need to download anything first.
How to open it: Press Cmd + Space to open Spotlight Search. Type Terminal, then press Enter. A window will appear with a line of text ending in
%— this is called the prompt, and it means the terminal is ready for your input.Alternative methodOpen Finder → Applications → Utilities → Terminal. Or use Launchpad and search for "Terminal" there.
-
2
Check your internet connection
The installer downloads files from the internet, so you'll need a working connection. You can quickly verify your connection is active by typing the following and pressing Enter:
ping -c 3 claude.ai
If you see responses with times (e.g.
64 bytes from ...), your connection is working. Press Ctrl + C to stop the ping. If you see errors, check your Wi-Fi and try again. -
3
Run the installation command
Copy the entire command below, paste it into your terminal with Cmd + V, and press Enter.
curl -fsSL https://claude.ai/install.sh | bash
What each part does:
curl— downloads the installer script from the internet-fsSL— flags that tell curl to be silent, follow redirects, and show errors| bash— passes the downloaded script to bash to run it
You'll see text scrolling as it installs. This is normal — it's showing you what it's doing. The process usually takes under 30 seconds.
What to expectYour Mac may ask for your password during installation. Type it (you won't see characters — this is normal) and press Enter.
-
4
Verify the installation succeeded
After the installer finishes, check that Claude Code is available by typing:
claude --version
You should see something like
Claude Code 1.x.x. If you see command not found, see the troubleshooting section below. -
5
Start Claude Code for the first time
Type the following and press Enter:
claude
Claude Code will launch and prompt you to sign in with your Anthropic account. A browser window will open automatically for authentication. If it doesn't open, look for a login URL printed in your terminal — copy and paste it into your browser.
No account yet?Visit claude.ai and create a free account first. It only takes a minute.
-
6
Navigate the terminal interface
Claude Code is entirely text-based. Here are the essentials for getting around:
- Type your question or request and press Enter to send it
- Press ↑ / ↓ arrow keys to scroll through previous commands
- Press Esc to interrupt Claude if it's working on something
- Type /help to see a list of available slash commands
- Type /clear to clear the current conversation context
- Press Ctrl + C to quit at any time
-
7
Open Claude Code in a project folder
Claude Code works best when it knows which folder you're working in. Navigate to your project folder before launching:
# Navigate to your project cd ~/Desktop/my-project # Then start Claude Code claude
Now Claude can read, create, and edit files in that folder. You can also open a folder in Finder and drag it onto the Terminal window — it'll type the path for you automatically.
-
8
Keep Claude Code up to date
Anthropic releases updates regularly. To update Claude Code at any time, run the same install command again — it will upgrade to the latest version:
curl -fsSL https://claude.ai/install.sh | bash
Or check your current version and compare it to the latest release:
claude --version
Get started
Things to try first
You don't need to know how to code — describe what you want in plain English and Claude will handle the rest.
Create a simple webpage
Claude writes all the code and puts it in a file you can open in your browser.
Fix a bug in your code
Paste in the error message and Claude will diagnose and fix the problem.
Understand a piece of code
Share any code snippet and Claude will walk you through exactly what it does.
Write a script for a task
Claude can write shell scripts and small programs to automate repetitive work.
If something goes wrong
Troubleshooting
The most common issues and how to fix them.
command not found: claude
This means your terminal doesn't know where Claude Code was installed. Close the terminal window entirely, open a new one, and try again. This alone fixes the issue most of the time.
If it still doesn't work, you need to add the install directory to your PATH:
# For Zsh (default on macOS Catalina and later) echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc # For Bash (older Macs) echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bash_profile && source ~/.bash_profile
Then type claude again.
Permission denied error during install
This happens when the installer can't write to the installation directory. Try running the install command with sudo:
sudo curl -fsSL https://claude.ai/install.sh | sudo bash
You'll be asked for your Mac login password. Type it and press Enter — you won't see any characters appear as you type, which is normal.
curl: command not found
curl is built into macOS and should always be available. If it's missing, try installing Xcode Command Line Tools first:
xcode-select --install
A dialog will appear — click Install. Once it's done, try the Claude Code install command again.
Installer runs but no browser window opens for login
Look carefully in your terminal — there should be a URL printed that looks like https://claude.ai/auth/.... Copy that URL and paste it into your browser manually.
If no URL appears at all, try quitting Claude Code with Ctrl + C and running claude again.
Claude Code is slow to respond
Response time depends on your internet connection and the complexity of your request. If it's consistently slow:
- Check that your internet connection is stable
- Try a shorter, more specific request to test the speed
- Check status.anthropic.com to see if there's a service issue
How do I uninstall Claude Code?
To remove Claude Code, delete the binary from where it was installed:
rm ~/.local/bin/claude
If you installed it with sudo to a system directory, use:
sudo rm /usr/local/bin/claude
That's all — no other files to remove.