1. System Requirements
| Item | Details |
|---|---|
| OS | macOS 10.15 or later / Ubuntu 20.04+ / Debian 10+ / Windows (WSL required) |
| Hardware | Memory: 4GB or more |
| Software | Node.js 18 or higher |
| Network | Internet connection required |
| Shell | Bash / Zsh / Fish recommended |
2. For Windows Users (Installing WSL/Ubuntu)
- Install WSL (Windows Subsystem for Linux) and Ubuntu distribution:
wsl --installAfter rebooting, check available distributions as needed:wsl -l -o - If older versions of node/npm are present in the initial state, remove them:
sudo apt remove nodejs npm
3. Installing Node.js (Recommended: nvm)
- Install nvm (Node Version Manager):
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash source ~/.bashrc- Install and use the Node.js LTS version:
nvm install --lts nvm use --lts
4. Installing Claude Code
To install globally (recommended method):
npm install -g @anthropic-ai/claude-code
Note: It is not recommended to use
sudowith the install command.
If you encounter permission errors, please refer to the “Configuration Guide” in the official documentation.
After installation, verify the version:
claude --version
5. Starting and Authenticating Claude Code (OAuth)
- Move to your project directory:
cd <your-project-directory> - Start Claude Code:
claude - On first launch, a selection screen for authentication method will appear.
Select “2. Anthropic Console account”. - Log into Console via the displayed link or screen in your browser to obtain an authentication code.
- Paste the authentication code into the terminal to complete registration.
The settings will be saved and auto-authentication will occur from the next startup.
6. Manually Setting the API Key for CLI
Specifying via Environment Variable
export ANTHROPIC_API_KEY="sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
claude
Persistent Configuration with settings.json
- If the
.claudefolder does not exist in your home directory, create it:mkdir -p ~/.claude - Create or edit
~/.claude/settings.jsonas follows:{ "env": { "ANTHROPIC_API_KEY": "sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" } }
- After setting this, the
claudecommand will automatically read your API Key.
7. Checking Configuration & Troubleshooting
- To check installation and authentication status:
claude doctor - If you encounter permission issues or npm permission errors, please refer to the “Troubleshooting” section in the official documentation.
8. Bedrock Integration Setup
Add the same three lines to your shell startup file.vi ~/.bashrc
Then append:export CLAUDE_CODE_USE_BEDROCK="1"
export AWS_REGION="ap-northeast-1"
export AWS_BEARER_TOKEN_BEDROCK=""
Reload:source ~/.bashrc
use sonnet as model:/model sonnet
9. How to Update
Automatic Updates (Enabled by Default)
Claude Code updates itself automatically.
To disable automatic updates:
claude config set autoUpdates false --global
# Or
export DISABLE_AUTOUPDATER=1
Manual Update
claude update
10. Frequently Asked Questions & Notes
- Most errors during installation or startup are related to permission, Node.js version, or network settings.
- Windows users must always operate in a WSL + Linux environment.
- For the latest information, FAQ, and support, please consult the official documentation and the official Discord, etc.