FirstPrompt
Inicia sesión
Lanza con Claude CodeMódulo 1 · Instala Claude Code
Lección 1 de 6Siguiente
2:03

Este vídeo está en inglés por ahora. La versión en español llega pronto.

Instala Claude Code

GratisVídeo 2:038 min de lecturaLección 1 de 6

Módulo 1 · Instala Claude Code

0/6
  1. 2:03Instala Claude CodeReproduciendo
  2. 2:17Tu primer archivoVídeo
  3. 2:28¿A dónde se fue ese archivo?Vídeo
  4. 2:26Cuando Claude se equivocaVídeo
  5. 2:16Lo que Claude tiene permitido hacerVídeo
  6. 1:41Resumen del módulo 1Vídeo
  7. Checkpointquiz + publicar

Estás leyendo sin cuenta: tu progreso solo se guarda en este dispositivo.

Regístrate gratis para no perderlo

In the next few minutes you will install Claude Code and see it print its version number. That is the whole lesson.

Already have Claude Code installed? Run claude --version. If it prints a version number, you're already set up — use Next at the bottom of the page to skip ahead to your first prompt.

You need two things: a computer, and a paid Claude plan from Anthropic (Pro, Max, Team or Enterprise). This is separate from any FirstPrompt plan. The free Claude.ai plan does not include Claude Code. If you do not have a plan yet, get one first, because everything after this page depends on it.

Nothing in this lesson can break your computer. You are going to open a window, paste one line, and press Enter.

Step 1 — Open your terminal

The terminal is a window where you type instructions instead of clicking them. It is already on your computer. You do not need to download it.

Press Win + X, then choose Terminal. On older machines the menu says Windows PowerShell instead. Either is fine.

A window opens with pale text on a dark background. The last line ends with > and a blinking block. That blinking block is the cursor. It means the computer is waiting for you.

Now look at the start of that last line. If it begins with PS, you are in PowerShell. If there is no PS, you are in CMD. You need to know which one, because the next step is different for each.

That is the terminal, and it is now open. That was the part most people never get past.

Step 2 — Paste one line

This line is Anthropic's official installer. It downloads Claude Code and puts it on your computer.

If your line starts with PS, use this one:

Use the copy button, then paste into the terminal and press Enter.
irm https://claude.ai/install.ps1 | iex

If your line has no PS, you are in CMD, so use this one instead:

curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

To paste, press Ctrl + V. Then press Enter.

Text scrolls past while it works. That is normal. Wait until it stops and the cursor is blinking again.

You may also see a message like Native installation exists ... not in your PATH. That is expected, and you can ignore the steps it lists. Go on to Step 3: if it gives you an error, the fix is right below it.

For this one line, copy and paste rather than typing. A single wrong character in an install command produces an error that is hard to read and harder to fix. From the next lesson on, you will type things yourself.

Step 3 — Check that it worked

Type this one yourself. It is short, and typing it is how you learn that a command is only words you type.

claude --version
Deberías ver
2.1.211 (Claude Code)

Your number will be different from the one above. Any version number means it worked.

That number is the first thing you have made this computer do from the terminal. You installed a program, and you confirmed it is there.

If it did not work

If you got an error instead of a version number, find your exact error below.

Si ves 'claude' is not recognized

Your terminal does not know where Claude Code is yet. Closing the window does not fix this, because the installer does not change your PATH, the list of folders your terminal searches. Paste this line and press Enter. It adds the right folder:

This is a PowerShell line. If you are in CMD, type powershell, press Enter, then paste it.
$b = $env:USERPROFILE + '\.local\bin'; [Environment]::SetEnvironmentVariable('PATH', [Environment]::GetEnvironmentVariable('PATH', 'User') + ';' + $b, 'User'); $env:PATH += ';' + $b

Now run claude --version again in the same window. If you get the same error, check that Claude Code is really there:

Test-Path ($env:USERPROFILE + '\.local\bin\claude.exe')

If that prints False, the install did not finish. Go back to Step 2 and run the install line again.

Si ves command not found: claude

Same cause as above: your terminal does not know where Claude Code is yet, and closing the window does not fix it. Paste this line and press Enter:

echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc

If your terminal uses bash, which is normal on Linux, use this line instead:

echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc

Now run claude --version again. If you get the same error, check that Claude Code is really there:

ls -la ~/.local/bin/claude

If that says No such file or directory, the install did not finish. Go back to Step 2 and run the install line again.

Si ves The token '&&' is not a valid statement separator

You are in PowerShell but used the CMD line. Go back to Step 2 and use the irm line.

Si ves 'irm' is not recognized

You are in CMD but used the PowerShell line. Go back to Step 2 and use the curl line.

Si ves syntax error near unexpected token '<'

This usually means Claude is not available in your country yet. Check Anthropic's list of supported countries. You can still practise in the browser sandbox while you sort it out.

Si ves an SSL or TLS error

This happens on older Windows 10 machines. Run this line first, then try the install again:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Si ves anything else

Copy the exact error text and look it up on Anthropic's install troubleshooting page, which lists errors by their message. If you are still stuck, message us. A stuck install is our problem to fix, not yours.

What you now have

  • Claude Code, installed on your own computer.
  • A terminal you know how to open.
  • Proof that it works: a version number you printed yourself.

Next: you will ask Claude to write a file for you, and then go and look at it.

Práctica

Prueba esta lección en una terminal guiada.

Regístrate gratis para practicar

Bonus de 2 minutos

¿Qué prompt gana?

La misma tarea, dos prompts. Elige el que consigue la mejor respuesta de Claude.

SiguienteTu primer archivo
Siguiente
CursosExplora Lanza con Claude CodePrompt packsCrea tu propio sitio web