Claude Code Installation for Beginners: Step-by-Step Guide

Bài viết do Ban biên tập Marketing365 thực hiện, biên tập theo Chính sách biên tập của Marketing365. Cập nhật lần cuối .

Nội dung
  1. Key points
  2. System requirements before Claude Code installation
  3. How to install Claude Code via npm
  4. Sign in and authenticate your account
  5. Run your first command with Claude Code
  6. Effective usage tips for marketers and SMEs
  7. Frequently asked questions about Claude Code installation
    1. Is Claude Code free?
    2. I don’t know how to code. Can I still use it?
    3. Is it difficult to install on Windows?

Claude Code installation for beginners only takes a few steps: prepare Node.js 18 or later, run the command npm install -g @anthropic-ai/claude-code, sign in, and try your first command. Claude Code is a command-line tool (CLI) that lets you instruct AI to write, edit, and explain code directly in the terminal.

Key points

  • System requirements: macOS/Linux/Windows (WSL or Git Bash is recommended on Windows), Node.js 18+, a stable Internet connection, and an Anthropic/Claude account.
  • Claude Code is distributed as an npm package — there is no separate .exe or .dmg file; install it globally with a single command, then verify with claude –version.
  • Never use sudo to install; if you run into permission errors, reconfigure the npm global directory according to the official instructions.
  • Sign in with a Claude account (Pro/Max plan) or an Anthropic API key; your information is stored securely, so you won’t need to sign in again next time.
  • It’s best to work in a project that already uses Git so you can revert changes, and always review Claude Code’s suggested changes carefully before accepting them.

If you’ve just heard about Anthropic’s AI coding tool and want to get started right away, this Claude Code installation for beginners guide is a good place to begin. Claude Code is a command-line tool (CLI) that lets you instruct AI to write, edit, and explain code directly in your computer’s terminal. This article focuses on the practical steps: checking your machine, installing via npm, signing in, and running your first command. If you’re still unclear on the concept, read What is Claude Code first, then come back here to try it out.

System requirements before Claude Code installation

Before you begin, make sure your machine meets the minimum requirements. Preparing the right environment will help the Claude Code installation go smoothly and avoid the common errors beginners often encounter.

System requirements before Claude Code installation
System requirements before Claude Code installation
  • Operating system: macOS, Linux, or Windows. On Windows, Claude Code works best through WSL (Windows Subsystem for Linux) or Git Bash.
  • Node.js version 18 or later: This is a required condition because Claude Code is installed via npm. You can download Node.js for free at nodejs.org, and you should choose the LTS version for stability.
  • Stable Internet connection: The tool communicates with the AI model over the network, so a good connection will help responses come back faster.
  • An Anthropic or Claude account: You need an account to sign in and use it. Learn more about the underlying AI assistant in the article What is Claude.

To check whether Node.js is already installed, open your terminal and type node --version. If the result shows a version number from 18 or later (for example v20.11.0), you’re ready to go. If you see the error “command not found”, install Node.js first.

How to install Claude Code via npm

Claude Code is distributed as an npm package, not as a separate .exe or .dmg installer file. This is a common point of confusion for beginners. You only need a single command to install it globally.

How to install Claude Code via npm
How to install Claude Code via npm
  1. Open your terminal (Terminal on macOS/Linux, or PowerShell/Git Bash on Windows).
  2. Type the following command and press Enter:
    npm install -g @anthropic-ai/claude-code
  3. Wait for the download and installation to finish. Depending on your network speed, this may take one to a few minutes.
  4. Check that the installation succeeded by typing:
    claude --version
    If the terminal displays a version number, the installation is complete.

Important note: Never use sudo to install it (for example sudo npm install -g). This can cause permission issues later. If you run into access errors, reconfigure the npm global directory according to the official instructions instead of using sudo. Full, up-to-date documentation is always available at docs.anthropic.com/en/docs/claude-code and the developer portal code.claude.com.

Sign in and authenticate your account

After installation, the next step is to connect Claude Code to your account. Navigate your terminal to the project directory you want to work in, then launch the tool.

Sign in and authenticate your account
Sign in and authenticate your account
  1. Move into your project folder, for example: cd ~/du-an-cua-toi
  2. Type the launch command: claude
  3. The first time you run it, the tool will open a browser for you to sign in. There are two common options:
    • Sign in with a Claude account: Suitable if you already have a Claude Pro or Max subscription plan.
    • Use an Anthropic API key: Suitable if you want to pay based on usage. How to obtain and use this key is explained in detail in the article how to use Claude API.
  4. Complete authentication in the browser, then return to the terminal — you’ll see the command-line interface ready to accept commands.

Your login information is stored securely on your machine, so you won’t need to sign in again later. For small businesses (SMEs), it’s a good idea to use a shared account with cost controls so usage is easier to track.

Run your first command with Claude Code

This is the most interesting part. Once the claude interface is open, you can give commands in Vietnamese or English, phrased naturally as if you were messaging a colleague. Here are a few commands to try when you’re just getting started:

Run your first command with Claude Code
Run your first command with Claude Code
  • Understand the codebase: Type “Explain this project structure to me”. Claude Code will read the files and summarize them for you.
  • Fix a bug: Paste in the error message and ask “Find and fix this error”. The tool will suggest changes and ask for permission before editing files.
  • Build a new feature: Describe the requirement, for example “Create a contact form with email validation”.
  • View help: Type /help to see the list of internal commands, or /exit to quit.

A good habit for beginners: always review the changes the tool suggests carefully before accepting them. Claude Code asks for confirmation before each file edit, which is a safety mechanism that keeps you in control. Work in a project that already uses Git so you can revert at any time if the result isn’t quite right.

Effective usage tips for marketers and SMEs

You don’t need to be a professional developer to use Claude Code. Marketers and small business owners can use it to quickly build landing pages, write automation scripts, or edit websites. A few suggestions:

Effective usage tips for marketers and SMEs
Effective usage tips for marketers and SMEs
  • Start small: Try it on a test project before applying it to a live system.
  • Be specific: The more precise your request, the more accurate the result. Clearly state the language, framework, and goal.
  • Compare tools: If you’re deciding between options, refer to Claude Code vs Cursor to choose what fits your needs.
  • Learn more about AI fundamentals: The AI guide series on Marketing365 will help you use AI tools more systematically.

Anthropic also regularly rolls out new features; you can follow official channels such as the Anthropic news page so you don’t miss anything.

Frequently asked questions about Claude Code installation

Is Claude Code free?

The CLI tool itself is free to download via npm, but using it requires a Claude account (subscription plan) or a usage-based paid API key. Beginners should start with a smaller plan to get familiar, then upgrade when needed.

Frequently asked questions about Claude Code installation
Frequently asked questions about Claude Code installation

I don’t know how to code. Can I still use it?

Yes. You give commands in natural language and Claude Code handles the coding. That said, a basic understanding of the terminal and Git will help you use it more safely and confidently.

Is it difficult to install on Windows?

No, but it’s best to install Node.js first and then use WSL or Git Bash instead of the default Command Prompt for the best compatibility. The remaining installation steps are exactly the same as on macOS and Linux.

In short, the Claude Code installation for beginners only takes a few steps: prepare Node.js, run npm install -g @anthropic-ai/claude-code, sign in, and try your first command. Once you get used to it, you’ll find this tool saves a great deal of time for both technical and marketing work. Start with a small project today and discover the power of Claude Code.

You may also like

Leave a Comment