Hello! This guide will walk you through the process of installing Claude Code in a WSL environment on Windows 11. We’ll go step by step so that even beginners can follow along easily.
Prerequisites
- Windows 11 installed on your computer
- Active internet connection
1 Enable WSL and Install Ubuntu
① Enable WSL
- Right-click on the Start menu and select “Windows Terminal (Admin)”
- In the terminal window, enter the following command and press Enter:
Windows Terminal (Admin)
wsl –install
- Restart your PC after the installation is complete
② Install Ubuntu
- After restarting, open the Microsoft Store
- Search for “Ubuntu” and install the “Ubuntu” app
- Once installation is complete, launch Ubuntu from the Start menu
- During the first launch, you’ll be prompted to set up a username and password (choose something you’ll remember)
2 Install Node.js and npm
- In the Ubuntu terminal, update the package list with the following command:
Ubuntu Terminal
sudo apt update
- Next, install Node.js and npm:
Ubuntu Terminal
sudo apt install -y nodejs npm
- Verify the installation by checking the versions:
Ubuntu Terminal
node -v
npm -v
If the versions are displayed correctly, you’re good to go!
3 Install Claude Code
- In the Ubuntu terminal, install Claude Code using the following command:
Ubuntu Terminal
sudo npm install -g @anthropic-ai/claude-code
- After installation, verify the Claude Code version:
Ubuntu Terminal
claude -v
If the version is displayed, the installation was successful!
4 Set Up Claude Code
- Run the following command to launch Claude Code:
Ubuntu Terminal
claude
- Follow the on-screen instructions to enter your Anthropic API key and complete the authentication.
Note
Congratulations! You have successfully installed Claude Code in your Windows WSL environment and are now ready to use it. Experience the power of AI with Claude Code!
Additional Resources
- Claude Code Official Documentation (English)
- Detailed Claude Code Setup for Windows Environments (English)
コメントを残す