Search⌘ K
AI Features

Installing and Launching Claude Code

Explore how to install and launch Claude Code on your system, including verifying system requirements, installing dependencies, authenticating your account, and configuring the tool. Understand the initial setup process to prepare Claude Code for conversation-driven development and AI-assisted coding sessions.

We’ve established the core principle of tool use that gives Claude Code its power. Now it’s time to get that power working on your machine. By the end of this lesson, you’ll have Claude Code installed, authenticated, and running.

This process is straightforward, but precision is key. We’ll walk through it step-by-step.

How to install Claude Code

Before installing anything, verify that your system is ready. Skipping this quick check can turn minor issues into major headaches.

First, ensure the environment meets these minimum requirements mentioned below.

  • Operating system: macOS 10.15 or later, a modern Linux distribution. Another option can also be Windows 10 or later, with WSL or Git Bash.

  • Hardware: At least 4 GB of RAM.

Next, the most important software dependency is Node.js. Let’s check if you have the correct version. Open your terminal and run this command:

node -v

If you see a version like v18.0.0 or later, you’re good to go. If you see an error or an older version, install or update Node.js from the official website before proceeding.

npm install -g @anthropic-ai/claude-code

Now, note a critical point. If the command fails with a permission error, do not prefix it with sudo. Using sudo with npm install -g can create permission problems and security risks. Instead, use a Node version manager such as nvm, or configure npm to use a different directory.

How to use Claude Code

With the installation complete, it’s time to run the tool for the first time. In any existing project directory, run:

claude

On first run, Claude Code asks you to authenticate. Choose one of the paths mentioned below.

  • Claude.ai subscription: If you have a Claude Pro or Max subscription, log in with your Claude.ai account.

  • Anthropic Console: This common option opens a browser window for you to log in with your Anthropic account. It requires active billing in the Anthropic Console.

For now, choose the option that fits your account and follow the on-screen instructions.

Terminal 1
Terminal
Loading...

Let’s walk through exactly what you should expect to see.

  1. Choose your theme: The first screen is “Welcome,” which asks you to choose a text style for the terminal. Use the arrow keys to select an option and press “Enter.” You can change this later with the /theme command.

  2. Select your login method: Choose either your Claude subscription or an Anthropic Console account, as described above.

  3. Authenticate in your browser: After choosing, Claude Code attempts to open your default browser to an authentication page. If it doesn’t open, the terminal provides a long URL. Copy the URL and paste it into your browser.

  4. Review the security notice: After successful authentication, the terminal displays “Welcome to Claude Code” with two important security notes. These reminders explain that you are responsible for reviewing the code Claude generates and that you should use the tool only in the codebases you trust. Press “Enter” to continue.

  5. Respond to the trust prompt: Claude Code asks, “Do you trust the files in this folder?” To do its job, it needs permission to read and potentially execute files in the current directory. Proceed only in trusted projects. Select “Yes, proceed,” then press “Enter.”

After you grant trust, you land in the main Claude Code interface. You’ll see a welcome box with helpful commands and tips. The > prompt at the bottom indicates that Claude Code is ready for your first command.

Important note on authentication: In a normal development environment on your local machine, Claude Code stores your authentication tokens in hidden files (like ~/.claude.json), so you only need to log in once.

However, in this course environment, the terminal resets at the start of every lesson. This means your credentials will not be saved between sessions. At the beginning of each new exercise, you may need to run /login and quickly repeat the authentication steps.

Conclusion

Congratulations! You’ve installed Claude Code, completed the initial authentication, and configured Educative’s environment variable setup. Although this took some work, you’ve removed authentication friction for the rest of the course.

Starting with the next lesson, Claude Code will start with a single command, so you can focus on learning AI-powered development instead of wrestling with setup. You now have one of the most powerful AI coding tools at your fingertips, preconfigured and ready to support your software development.

In the remainder of this course, we’ll engage in real coding sessions with Claude Code and explore the fundamental patterns that make AI-assisted development effective.