Yar Malik
HomeFree CourseResourcesStartupsPortfolioPartnershipsAbout
Join the community
Build a 1-Person AI Business with Claude/Getting Started with Claude Code

Course 01 · Lesson 6 of 12

Install via Terminal: The Power Option

This lesson is for people who want to use Claude Code in the terminal. If you are using the Desktop App, skip this lesson and go straight to the next one. You can always come back here when you are ready.

The terminal version of Claude Code gives you the most power and speed. Once you are used to it, it is faster than any graphical interface. But it requires you to be comfortable typing commands.

What you need first

On Mac or Linux, your built-in Terminal app is all you need.

On Windows, you need Windows PowerShell, which comes pre-installed on Windows 10 and later. You can also use Windows Subsystem for Linux (WSL) if you prefer.

You also need an Anthropic account to sign in after installation.

Installation: Choose Your Method

Method 1: npm Install (Confirmed Working on All Systems)

If you have Node.js installed (version 18 or higher), run this:

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

This is the most reliable method and works on Mac, Windows, and Linux. If you do not have Node.js, download it free at nodejs.org before running this command.

Method 2: One-Line Install Script

On Mac or Linux, open your terminal and run:

curl -fsSL https://claude.ai/install.sh | bash

On Windows PowerShell, run:

irm https://claude.ai/install.ps1 | iex

Press Enter and the script installs Claude Code automatically. This usually takes less than a minute. Note: if these URLs do not work, use the npm method above instead, which is always current.

After installation: First launch

Open your terminal. Type "claude" and press Enter. The first time it runs, it will ask you to sign in. Follow the prompts on screen. Once you are through the sign-in, you are ready.

To confirm your installation is working, run:

claude --version

This shows your installed version and confirms everything is set up correctly.

How to navigate the terminal interface

Type your prompt after the cursor and press Enter.

Claude responds and shows what it is planning to do.

Press Y to approve an action or N to skip it.

Press Ctrl and C together to stop Claude mid-task at any time.

Useful commands you can type at any time:

  • /help shows all available commands.
  • /clear clears the current conversation but does not delete your files.
  • /memory shows what Claude remembers about your project.
  • /quit exits Claude Code.

Opening a project folder in the terminal

Navigate to your project folder before starting Claude Code. Type these two lines one at a time:

cd Desktop/my-first-build

claude

This opens Claude Code inside your my-first-build folder. Every file Claude creates will appear in that folder.

Troubleshooting

"Command not found: claude": close your terminal, reopen it, and try again. The install script updates your PATH settings, which only takes effect on a fresh terminal session.

"Permission denied" on Mac or Linux: add sudo before the curl install command. Type: sudo curl -fsSL https://claude.ai/install.sh | bash and enter your computer password when prompted. Alternatively use the npm method which does not require sudo in most setups.

"I am on Windows and nothing works": make sure you are using Windows PowerShell and not the old Command Prompt. Search for PowerShell in your Start menu. The two apps look similar but behave differently.

Your action right now

✓ Run the install command for your system

✓ Type `claude` to launch it

✓ Run `claude doctor` to confirm it is working

✓ Navigate to your my-first-build folder and open Claude Code there

When you are ready, move to the next lesson: Your First Prompt.

PreviousInstall the Desktop App: Step by StepNext lessonYour First Prompt: Build Something

Do it with other builders

Post your homework. Get unstuck.

Every course ends with homework. Post yours in Claude Codex Mastery, the community this course comes from, and get feedback from Yar and 400+ people building the same way.

Join the community · $29/mo
Getting Started with Claude Code
  1. 1.Start Here - Welcome to Claude Code Foundations
  2. 2.What Is Claude Code?
  3. 3.Claude Code vs Claude AI: What Is Different
  4. 4.Where Claude Code Lives: Your 5 Options
  5. 5.Install the Desktop App: Step by Step
  6. 6.Install via Terminal: The Power Option
  7. 7.Your First Prompt: Build Something
  8. 8.Understanding the Interface: Everything You See
  9. 9.Approval Modes: You Are Always in Control
  10. 10.The Context Window: Claude's Working Memory
  11. 11.Course Summary: What You Now Know
  12. 12.Homework: Your Claude Code Foundations Build

Yar Malik

AI operator, educator, and founder building businesses around automation, media, and monetizable skills.

HomeAboutFree CourseBlogsPartnershipsCommunity

© 2026 Yar Malik. All rights reserved.