macOS and Linux
Follow these steps to install and start Claude Code from a macOS or Linux terminal. Claude Code requires macOS 13.0 or later. See the system requirements for supported Linux distributions.Open a terminal
Cmd + Space to open Spotlight Search, type Terminal, and press Enter.Linux: Open your terminal app. On most distributions, press Ctrl + Alt + T or search for “Terminal” in your application menu.A window will appear with a blinking cursor. This is your terminal, where you type commands.Install Claude Code
Cmd + V on macOS, Ctrl + Shift + V on Linux), and press Enter:Start Claude Code
claude and press Enter:command not found: claude, the install directory isn’t on your PATH yet. Follow the ‘command not found: claude’ fix below, then open a new terminal window and try again.You’ll be prompted to log in with your Claude account. Follow the on-screen instructions. A browser window will open for you to sign in.Start using Claude Code
Enter to send them. A few things to know:- You can’t click on things in the terminal. Use the arrow keys to move around.
- Press
Escto interrupt Claude if it’s running. - Type
exitor pressCtrl + Dtwice on an empty prompt to leave Claude Code. - Type
/helpto see available commands.
Windows
Follow these steps to optionally install Git for Windows, set up PowerShell, and start Claude Code on Windows. Claude Code requires Windows 10 version 1809 or later. See the system requirements for full details.Install Git for Windows (optional)
- Go to git-scm.com/downloads/win and download the installer
- Run the installer. Click Next on each screen to accept the defaults. The installer has many screens, but you don’t need to change anything.
- If it asks you to choose an editor, keep the default and click Next.
- When you see “Adjusting your PATH environment,” keep the recommended option selected.
Open PowerShell
Win + X and select Windows PowerShell (or Terminal) from the menu. A window with a blinking cursor will appear. This is where you’ll type commands.- PowerShell: shows
PS C:\Users\YourName>at the start of each line - CMD: shows
C:\Users\YourName>without thePS
Install Claude Code
Ctrl + V or right-click, and press Enter:irm fetches the file and iex runs it. You’ll see text scrolling as it works. When it’s done, you’ll see “Claude Code successfully installed!” If you see an error instead, check the troubleshooting section below.Start Claude Code
claude. If PowerShell says 'claude' is not recognized, the install directory isn’t on your PATH yet. Follow the ‘claude is not recognized’ fix below, then open a new PowerShell window and try again.Start using Claude Code
Enter to send them. A few things to know:- You can’t click on things in the terminal. Use the arrow keys to move around.
- Press
Escto interrupt Claude if it’s running. - Type
exitor pressCtrl + Dtwice on an empty prompt to leave Claude Code. - Type
/helpto see available commands.
What’s next?
Once you see the Claude Code welcome screen, you’re ready to go. You don’t need to know how to code. Describe what you want in plain English, and Claude writes the code for you.Build something
Claude can create projects from a description:Enter to choose Yes and approve. Once Claude creates the files, double-click the HTML file to open it in your browser.
Work with files on your computer
Claude can read and organize files you already have:Ask questions
Claude can explain things, help you learn, or plan out a project:Other ways to use Claude Code
You don’t have to use the terminal. Claude Code is also available in:- VS Code and JetBrains IDEs as editor extensions
- The desktop app, with no terminal required
- The web at claude.ai/code for cloud sessions
- GitHub Actions and GitLab CI/CD for automation
Learn more
- Quickstart: a guided walkthrough of your first project with Claude Code
- How Claude Code works: understand how Claude reads your files, runs commands, and makes edits
- Best practices: get better results with effective prompting and project setup
- Common workflows: step-by-step guides for debugging, testing, refactoring, and more
- Terminal configuration: customize your terminal for the best Claude Code experience
Troubleshooting
macOS and Linux troubleshooting
If you run into problems installing on macOS or Linux, check these common issues:'command not found: claude'
'command not found: claude'
command not found: claude after installing, the folder where the installer put claude isn’t in your PATH. The installer prints the exact fix under Setup notes at the end of the install, so run that command, or use the one for your shell below.For Zsh, the macOS default shell:claude again. If it still isn’t found, check that the file ~/.local/bin/claude exists. If it doesn’t, the install didn’t finish. For more details, see fix your PATH.Error with HTML code or 'syntax error near unexpected token'
Error with HTML code or 'syntax error near unexpected token'
bash: line 1: syntax error near unexpected token '<' or HTML code like <!DOCTYPE html> in your terminal, the install URL returned a web page instead of the installer script.If the page says “App unavailable in region,” Claude Code is not available in your country. See supported countries.Otherwise, try running the command again. If it keeps happening, install with Homebrew instead:'dyld' error or 'built for Mac OS X 13.0'
'dyld' error or 'built for Mac OS X 13.0'
dyld: cannot load, dyld: Symbol not found, or built for Mac OS X 13.0, your macOS version is likely older than Claude Code supports.Open the Apple menu and select About This Mac to check your version. If it’s older than 13.0, update macOS through Software Update. See the macOS troubleshooting guide for more details.Windows troubleshooting
If you run into problems installing on Windows, check these common issues:'irm is not recognized'
'irm is not recognized'
Win + X then select Windows PowerShell).Alternatively, use the CMD install command:SSL/TLS error or 'Could not create SSL/TLS secure channel'
SSL/TLS error or 'Could not create SSL/TLS secure channel'
'Claude Code on Windows requires either Git for Windows (for bash) or PowerShell'
'Claude Code on Windows requires either Git for Windows (for bash) or PowerShell'
- Ensure
powershell.exeis on yourPATH. Its default location isC:\Windows\System32\WindowsPowerShell\v1.0\. Alternatively, install PowerShell 7, which providespwsh. - If you’d rather use Git Bash, install Git for Windows per the first step in the Windows section.
- If Git is installed but Claude Code can’t find it, tell it where to look:
Then run
claudeagain. If your Git is installed somewhere else, find the path by running:Look for theGit\binfolder in that path and use it instead.
'claude is not recognized'
'claude is not recognized'
claude again. You should see the Claude Code welcome screen. See verify your PATH for more details.