2025/08/21現在、Claude Codeはネイティブでwindowsに対応しています。
......が、あえて以前のバージョンを使わざるを得ない場面があると思うので、WSLでの環境構築方法も載せておきます。
(「あえて以前のバージョンを使わざるを得ない場面」の参考:)
1.PowerShellを開いて以下のコマンドを叩く
wsl --install -d Ubuntu-22.04
# ここで、インストールが終わったら名前とパスワードを入力する
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs build-essential
node -v # v22.x が表示されれば OK
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
exec $SHELL
nvm install 22
nvm use 22
nvm alias default 22
npm install @anthropic-ai/claude-code@1.0.24 -g # 例)v1.0.24のインストール
claude config set -g autoUpdaterStatus disabled
claude # claude起動
もしここで、
╭──────────────────────────╮
│ ✻ Welcome to Claude Code │
╰──────────────────────────╯
Unable to connect to Anthropic services
Failed to connect to api.anthropic.com: ETIMEDOUT
Please check your internet connection and network settings.
Note: Claude Code might not be available in your country. Check supported countries at https://anthropic.com/supported-countries
となった場合、Anthropic側のテレメトリ(statsig.anthropic.comなど)とのTLSハンドシェイク失敗が原因なので、以下のようにして起動します。
DISABLE_TELEMETRY=1 claude
2. VSCodeでclaudeを使う
VSCodeにWSL拡張機能をいれます。
Ctrl+Shift+PでWSLと入力し、「Reopen Folder in WSL」を選択すればよいです。
おわり!
ちなみに
こちらの公式ページが参考になります(最近(2025/08/22現在)はネイティブインストールが良さそうみたいな情報もありますね)