To launch Claude Code in terminal, install the Claude Code command-line tool, open the folder that contains your project, type claude, complete the sign-in process, and review every permission request before allowing file changes or shell actions. Start with a read-only question to confirm that Claude Code is operating in the correct repository.
This guide covers setup for Windows, macOS, Linux, and WSL, including installation, authentication, project selection, troubleshooting, and beginner safeguards.
What Is Claude Code?
Claude Code is Anthropic’s coding assistant for the command line. It can examine a project, explain unfamiliar files, suggest changes, edit approved files, run permitted terminal commands, support Git workflows, and help with testing or debugging.
Unlike browser chat, Claude Code can work with local files and available development tools. Users must therefore monitor folder scope, credentials, approvals, and generated changes.
The simplest explanation of how to launch Claude Code in terminal is this: install the CLI, move into the intended project folder, type claude, sign in, and start with a limited request.
How Do You Launch Claude Code?
Follow these five steps:
- Install Claude Code using the official installer or a supported package manager.
- Close and reopen the terminal after installation.
- Navigate to the root folder of the project you want Claude Code to inspect.
- Confirm the folder path, then type claude and press Enter.
- Sign in and ask Claude Code to explain the project without changing files.
The launch command to use is “Claude.” To ensure a smooth operation, be aware that most issues arise from PATH errors, shell mismatches, incomplete installations, or selecting the wrong working folder. Address these potential pitfalls for the best experience!
What Do You Need Before Starting?
You need a supported computer, a terminal, internet access, an eligible Claude or organizational account, and permission to work inside the chosen project directory.
Claude Code supports macOS, Windows, common Linux distributions, and Windows Subsystem for Linux. A supported 64-bit system and adequate memory are required; large repositories need more resources.
Use a shell you understand: Zsh on macOS, PowerShell or Command Prompt on Windows, or Bash or Zsh on Linux. WSL users should install Claude Code inside WSL when the project lives there.
Access may come through a Claude plan, team workspace, enterprise organization, Console account, or approved cloud platform. Company users should follow internal identity and security policies.
Choose a safe project. Avoid home, drive-root, download, or parent folders containing unrelated work. Start with a small Git-controlled repository.
How to Install Claude Code
Anthropic recommends its native installer, while Homebrew and WinGet remain supported alternatives.
On macOS, Linux, or WSL, use the native command on the official quickstart page. On Windows, choose the command written for PowerShell or Command Prompt.
Do not copy a PowerShell command into Command Prompt or a Command Prompt command into PowerShell. The syntax differs, and shell mismatch is a common reason installation fails.
After installation, reopen the terminal so updated environment settings and PATH entries load.
Type claude –version. A version response confirms installation. A command-not-found error usually points to PATH, an unfinished install, or a terminal that was not restarted.
Update Homebrew or WinGet installations through the same package manager. Native installations can update automatically.
How to Launch Claude Code in Terminal
Open your preferred terminal and move into the project directory. Use the normal change-directory command for your shell, followed by the full or relative path to the project.
Before launching, display the location and list files. Use pwd and ls on macOS, Linux, or WSL; use cd and dir in Command Prompt. PowerShell supports Get-Location and the pwd alias.
In a Git repository, run git status to check the branch and uncommitted work. Save important changes before permitting edits.
Once the path is correct, type claude and press Enter. The first launch usually begins authentication. Later launches normally open an interactive Claude Code session in the current directory.
Make the first prompt narrow and read-only. Ask for the folder structure, main entry point, or project organization without changes.
Use the response to confirm repository scope. If it describes unrelated files, exit, correct the folder, and relaunch.
Why the Project Folder Matters
Claude Code uses the current directory as its starting context. The repository root usually provides source files, configuration, tests, documentation, and Git history.
Starting too high in the folder hierarchy can expose unrelated projects or personal files. Starting too deep may hide important configuration stored closer to the repository root.
A project root often contains Git data, a package manifest, build settings, a README, source files, or tests. Inspect it before launching.
Although a session can move between directories, beginners should avoid expanding scope. Relaunching from the correct folder creates a clearer boundary.
How Authentication Works

When you run Claude Code for the first time, it typically opens a browser window to sign in. Complete the login using the account associated with your Claude plan, Console access, team workspace, enterprise organization, or approved provider.
If the browser does not open, copy the displayed login address and open it manually. WSL, SSH, and containers may require pasting a login code into the terminal.
When an Anthropic API key is already set, Claude Code may request approval for that credential. Never expose keys in repositories, screenshots, shared history, or support posts.
Use /logout to remove the active account and repeat setup. Ask an administrator when organizational login methods are restricted.
What Happens After Claude Code Opens?
After logging in, Claude Code presents a prompt linked to the current directory. It can read files, answer questions, suggest edits, and request permission to run tools or actions. The experience depends on your account, configuration, installed version, settings, and policies.
Do not treat a launch as permission to approve everything. Confirm the project path, ask for a summary, and compare the answer with files you recognize. Inspect permission rules before requesting changes.
For an initial task, choose something to review, such as improving a README paragraph, locating a configuration value, explaining a test failure, or identifying files related to a feature. Avoid deployments, database migrations, dependency overhauls, mass renaming, and production access until you understand the workflow.
What Makes a Good First Prompt?
A first prompt states the goal, limits the scope, and defines what Claude Code must not do. For example, ask it to explain the project structure, name files involved in a feature, and avoid edits or commands.
When making a change request, clearly specify the target file, expected outcome, validation method, and boundaries. If several files might be impacted, demand a plan before execution. Clear constraints are essential; they enhance reviewability and minimize unnecessary details.
Essential Claude Code Commands
Beginners only need a small command set.
- claude starts an interactive session in the current directory.
- claude followed by a quoted task starts a session with an initial instruction.
- claude -p followed by a query sends a one-time request, prints the response, and exits.
- claude -c continues the most recent conversation associated with the current directory.
- claude -r resumes a previous session selected by its identifier or name.
Inside an interactive session, /help displays available commands. /permissions lets you inspect approval rules. /clear starts a fresh conversation. /compact reduces the working conversation when context becomes large. /doctor checks the installation and configuration. /exit closes the session.
Type a forward slash inside the session to view commands available in your installed version.
Resume carefully because earlier assumptions may persist. Start fresh when changing projects, goals, branches, or security boundaries.
A Safe Beginner Workflow
Use the following process for your first real task:
- Select a small project that is already under Git version control.
- Save or commit the current state before opening Claude Code.
- Open the terminal and navigate to the repository root.
- Verify the path and inspect the visible files.
- Run git status and note the active branch.
- Check the installation with claude –version.
- Start Claude Code by typing claude.
- Complete authentication if prompted.
- Ask for a read-only explanation of the project.
- Confirm that the response matches the expected repository.
- Open /permissions and review saved approval rules.
- Request one small, reversible change.
- Read each proposed command before approving it.
- Inspect the resulting diff and changed files.
- Run the project’s normal tests or validation process.
- Exit the session and commit only the changes you understand.
This sequence separates orientation, permissions, editing, testing, and version control, making mistakes easier to detect and reverse.
How to Relaunch or Resume Claude Code
To relaunch Claude Code, return to the correct project folder and type claude again. This starts a new interactive session with the current directory as its project context.
To continue the latest conversation for that folder, use claude -c. To reopen a different saved session, use the resume option and choose the relevant conversation.
Start fresh when the task changes substantially. Resume only when earlier context remains useful and trustworthy.
Before continuing, please verify the branch, path, and working tree, as the earlier context may no longer be relevant.
Common Launch Problems and Fixes
-
Claude Command Not Found
Restart the terminal and retry claude –version. If it fails, confirm installation and PATH. Check official troubleshooting guidance before editing PATH manually.
-
Wrong Installer for the Shell
PowerShell and Command Prompt use different syntax. Open the intended shell and use its matching command. WSL users should install inside WSL.
-
Browser Does Not Open
Use the displayed option to copy or reveal the login address, open it manually, and complete authentication. In remote environments, paste the supplied login code back into the terminal.
-
Authentication Fails
Reopen Claude Code and sign in again. Confirm account access, active invitations, and permitted network connections. Use /logout for the wrong stored account.
-
Permission Denied
Confirm your normal account can read and write the installation and project folders. Avoid administrator or root execution, which widens risk and can create ownership problems.
-
Claude Opens the Wrong Project
Exit before approving actions. Navigate to the correct repository root, display the current path, list the files, check the Git status, and restart Claude Code.
-
Claude Code Runs Slowly
Large repositories, generated folders, long conversations, plugins, and integrations can increase resource use. Try /compact, restart between tasks, and run diagnostics.
-
Project Commands Fail
Claude Code and your application have separate requirements. Install required runtimes and dependencies through the project’s documented process, reviewing every proposed action.
Security Best Practices

Treat Claude Code as a powerful local collaborator, not an automatic authority.
Read every requested command. Pay special attention to deletion, dependency installation, network access, database operations, cloud tools, Git history changes, deployment commands, and scripts downloaded from the internet.
Keep permission rules narrow. Permanently approve only understood, repeatable actions, and remove broad allowances when they are unnecessary.
Protect secrets. Avoid exposing environment files, tokens, private keys, production credentials, customer records, or confidential documents. Redact sensitive values before asking for help.
Use Git defensively: work on a separate branch, begin clean, inspect the full diff, review new files and lockfiles, then test before committing.
Limit the scope of folders and avoid accessing parent directories. Use a disposable branch, worktree, container, or a non-production copy for making risky changes.
Before high-impact work, request a plan covering files, commands, tests, rollback steps, and assumptions.
Final Takeaway
How to launch Claude Code in the terminal comes down to a controlled sequence: install the official CLI, verify the installation, enter the correct repository, run claude, authenticate, and begin with a read-only request. The command is simple; safe setup depends on project scope, account access, permission review, version control, and careful approval.
A reliable terminal workflow should support a clear business process. Flexlab helps teams connect technical execution with lead management and sales operations, reducing handoff friction between tools, people, and decisions. Visit flexlab.io to discover how cleaner automation can lead to the quickest measurable improvements.
FAQs
1. How do I install Claude Code before launching it?
Install Claude Code using Anthropic’s official installer or a supported package manager for your operating system. Reopen the terminal after installation, then run claude –version to confirm that the command is available.
2. Why is the Claude command not working in my terminal?
A command-not-found error usually means the installation did not complete, the terminal has not loaded the updated PATH, or the wrong shell installer was used. Restart the terminal, verify the installation, and confirm that the Claude Code installation directory is included in PATH.
3. How do I stop Claude Code from making unwanted changes?
Begin with a read-only prompt, review permission settings, and approve only commands or file edits you understand. Utilize Git to review changes, restrict access to the designated project folder, and refrain from giving permanent permissions for broad or destructive actions.









