Large Language Models

Claude Code Terminal: Setup, Commands, Settings and Not Working Fixes

A practical, tested walkthrough of Claude Code in the terminal: how to install it on Windows, macOS and Linux, which slash commands matter, how settings.json and permissions work, and how to fix login, PATH, proxy and config errors fast.

Claude Code Terminal: Setup, Commands, Settings and Not Working Fixes
Cristian Da Conceicao

You typed claude, hit Enter, and got "command not found." Or it launched, then asked you to log in for the third time. Or it worked yesterday and today it refuses to start. This is the most common way people meet Claude Code, Anthropic's coding agent that lives inside your terminal, and almost every one of those problems has a five-minute fix once you know where to look.

This article walks through the whole loop in the order you will actually hit it: installing, running your first session, the slash commands worth memorizing, the settings files that control behavior, and a troubleshooting section for when things break. It is written for people who open a terminal because they have to, not because they love it.

💡 Quick note on scope: Claude Code is a tool you install on your own machine. It is not hosted on PicassoIA. If you just want to chat with Claude models in a browser, that is covered near the end.

What Claude Code Actually Is

Claude Code is a command line agent. You open a terminal inside a project folder, run claude, and talk to it in plain English. It reads your files, proposes edits, runs commands (with your permission), and can commit changes. Think of it as a coding assistant with direct access to your working directory instead of a chat window you paste snippets into.

Terminal tool versus chat window

A browser chat only sees what you paste. Claude Code sees your folder structure, your config files, your test output and your git history. That is why it can fix a failing test without you copying the stack trace by hand.

What it needs from your machine

RequirementWhy it matters
A terminal (Terminal, PowerShell, Windows Terminal, iTerm, a Linux shell)The interface is text only
Internet accessRequests go to Anthropic's servers
An Anthropic account or API accessNeeded to log in
Git Bash on native WindowsClaude Code uses it to run shell commands
Node.js, only for the npm routeNot needed for the native installer

Developer hands opening a terminal on a silver laptop in morning light

Setup on Windows, Mac and Linux

There are two routes. The native installer is the one Anthropic recommends: it ships as a single binary, updates itself in the background and does not need Node.js. The npm route still works and suits people who already manage global packages.

Native installer, the default choice

Open the official Claude Code setup page, copy the one line command for your operating system, and paste it into your terminal. macOS and Linux use a shell command. Windows uses a PowerShell command. After it finishes, close the terminal and open a fresh one so your PATH reloads.

Then check it worked:

claude --version

If a version number prints, you are done with installation.

The npm route

If you prefer npm, you need a current Node.js release first. Then run:

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

One warning from experience: do not put sudo in front of that. Installing global packages as root causes permission headaches later, including updates that silently fail. If npm complains about permissions, point npm's global prefix at a folder you own, or switch to the native installer.

Windows specifics

On native Windows, Claude Code needs Git Bash to run shell commands. Installing Git for Windows covers it. If Claude Code still cannot find it, set the path yourself in your settings file under the env block using the variable CLAUDE_CODE_GIT_BASH_PATH. Many people also run it inside WSL, which behaves like Linux and avoids most path quirks.

Engineer reading a laptop screen at a standing desk in late afternoon sun

First launch and login

Move into a project folder, then start a session:

cd my-project
claude

The first run opens a browser window to log in. Sign in with the account you plan to use, approve the request, and return to the terminal. After that, the session starts straight away.

💡 Run it from the project root. Claude Code treats the folder you launched it from as its workspace. Starting it from your home directory means it may try to read far more than you intended.

Commands Worth Memorizing

You do not need to memorize everything. Learning a dozen commands covers about 95 percent of daily use. Commands that start with a slash are typed inside a running session. Commands that start with claude are typed in your normal shell.

Slash commands inside a session

CommandWhat it does
/helpLists every available command
/initScans the project and creates a CLAUDE.md memory file
/clearWipes the conversation to start a fresh task
/compactSummarizes the conversation to free up context
/modelSwitches the model for the session
/configOpens the settings menu
/permissionsShows and edits allowed and denied actions
/doctorRuns a setup checkup from inside the session
/terminal-setupConfigures Shift+Enter for new lines
/mcpManages connected tool servers
/agentsManages sub agents
/hooksSets up commands that run on events
/login and /logoutSwitch accounts

Two of these save more time than the rest. /clear between unrelated tasks keeps old context from confusing the next answer. /compact keeps a long session alive when it starts to feel sluggish or forgetful.

Flat lay of a desk with laptop, cheat sheet, sticky notes and tea

Shell commands outside a session

CommandUse it for
claudeStart an interactive session
claude "explain this repo"Start a session with an opening prompt
claude -p "your question"One shot answer, then exit, good for scripts
claude -cContinue the most recent conversation
claude -rPick an older conversation to resume
claude updateUpdate to the latest release
claude doctorPrint install and settings diagnostics without starting a session
claude mcpConfigure tool servers from the shell

The -p flag is worth a closer look. It runs a single prompt, prints the result and exits, which means you can pipe output into it or call it from a script. A common pattern is feeding it a log file and asking for a summary.

Keyboard shortcuts that help

Press Esc to interrupt Claude mid response. Press Esc twice to jump back to an earlier message and rewind. Shift+Tab cycles permission modes, so you can move between asking before every edit and letting it proceed more freely. If Shift+Enter does not insert a new line in your terminal, run /terminal-setup once and it configures the binding for you.

Settings That Change Behavior

Claude Code reads configuration from several files, and knowing which one to edit saves a lot of confusion.

The three settings files

FileScopeShared with team?
~/.claude/settings.jsonEvery project on your machineNo
.claude/settings.jsonOne projectYes, commit it to git
.claude/settings.local.jsonOne project, just youNo, keep it out of git

More specific files override broader ones. A rule in your project settings beats the same rule in your user settings, and the local file beats both.

One trap: the file ~/.claude.json (note the position of the dot) is not a settings file. It stores runtime state such as login details, project caches and input history. Editing it to change behavior does nothing, and breaking it can log you out.

Two engineers at a shared standing desk pointing at configuration text on a monitor

A minimal settings.json

Here is a small, practical example:

{
  "model": "sonnet",
  "permissions": {
    "allow": [
      "Bash(npm run test:*)",
      "Bash(git status)"
    ],
    "deny": [
      "Read(./.env)"
    ]
  },
  "env": {
    "CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe"
  }
}

The permissions block is the part most people care about. Anything in allow runs without a prompt. Anything in deny is blocked outright. Everything else asks you first.

Permissions, the sensible way

The first week, let Claude Code ask. Every time you approve the same harmless command twice, add it to allow. Over a few days your prompts shrink to the genuinely risky actions. Keep secrets protected by denying reads on .env files and credential folders.

💡 Never allow blanket shell access just to stop the prompts. A narrow rule such as running your test script is safe. A wildcard on every command is not.

Macro shot of a fingertip pressing the Enter key on a mechanical keyboard

CLAUDE.md, the memory file

Run /init inside a project and Claude Code writes a CLAUDE.md file describing your build commands, folder layout and coding conventions. It reads that file at the start of every session. Edit it by hand: add the test command, the branch naming rule, the library you never want used. A short, accurate CLAUDE.md does more for answer quality than any setting.

Claude Code Not Working: Fixes

Start every troubleshooting session with the same command, run from your normal shell:

claude doctor

It prints install health, settings validation errors and suggested fixes without starting a session. Inside a session, /doctor does the same checkup. Read what it says before you reinstall anything.

Frustrated developer at a night desk with a laptop and an empty coffee cup

"command not found: claude"

The install worked but your shell cannot see the binary. Close the terminal and open a new one first, since PATH only reloads on launch. If that fails, check where the installer placed the executable and add that folder to your PATH. On npm installs, run npm config get prefix and confirm that folder's bin directory is on your PATH.

Login loops and auth errors

Try these in order:

  1. Run /logout, then /login, and finish the browser step completely.
  2. Check whether an ANTHROPIC_API_KEY environment variable is set. A stale key can override your account login and cause confusing authentication errors. Unset it and retry.
  3. Confirm your system clock is correct. A drifting clock breaks secure connections.
  4. If the browser never opens, copy the login address printed in the terminal and paste it into a browser yourself.

Invalid settings.json

A single missing comma in settings.json can cause strange behavior or ignored rules. claude doctor reports invalid JSON directly, which is the fastest way to find it. Common culprits are trailing commas, smart quotes pasted from a document, and unescaped backslashes in Windows paths. Use double backslashes or forward slashes.

Git Bash not found on Windows

If Claude Code complains about a missing shell on native Windows, install Git for Windows, then set CLAUDE_CODE_GIT_BASH_PATH in the env block of your settings file to the full path of bash.exe. Restart the terminal afterward.

Network, proxy and firewall problems

Corporate networks often block or rewrite traffic. Set the standard HTTPS_PROXY and HTTP_PROXY environment variables to your proxy address, then restart. If your company uses a custom certificate authority, the connection can fail with certificate errors until that certificate is trusted by your system or by Node. Ask your IT team for the certificate file rather than disabling verification.

Developer working on a laptop in a cafe with a router and mug on the table

Quick reference table

SymptomMost likely causeFirst fix
claude not recognizedPATH not reloadedOpen a new terminal
Asked to log in repeatedlyStale API key or expired session/logout, unset key, /login
Settings ignoredInvalid JSON or wrong fileclaude doctor
Shift+Enter sends the messageTerminal binding missing/terminal-setup
Permission errors on npm installGlobal folder owned by rootUse the native installer
Replies get vague or repetitiveContext is crowded/compact or /clear
Shell errors on WindowsGit Bash missingInstall Git, set the path variable
Timeouts and certificate errorsProxy or firewallSet proxy variables, trust the certificate

The nuclear option, done safely

If nothing works, reinstall rather than patching. Uninstall using the same method you installed with, delete nothing in ~/.claude yet, install fresh, then run claude doctor. Keeping your ~/.claude folder preserves your settings, memory files and custom commands.

Habits That Make Sessions Better

Once it runs, a few habits separate smooth sessions from frustrating ones.

Give it a small, concrete task

"Add input validation to the signup form and update its test" works. "Improve the app" does not. Claude Code does better with a clear finish line it can verify by running your tests.

Use git as your safety net

Commit before you start a big task. If the result goes sideways, one git checkout gets you back. Many people ask Claude Code to make the commits, then review the diff before pushing.

Watch your context

Long sessions fill the context window, and answer quality drops as they do. Use /clear when you switch topics, and /compact when you want to keep going on the same task. Starting fresh with a good CLAUDE.md beats dragging a 200 message conversation along.

Tidy developer workspace with a laptop, external monitor and houseplant in morning sun

Write custom commands

Drop a markdown file into .claude/commands/ in your project and its filename becomes a slash command. A file called review.md containing your review checklist becomes /review. This is the cheapest way to turn your team's repeated prompts into one word.

Chat With Claude Models in a Browser

Not every task needs a terminal. If you want to draft documentation, ask a quick code question or compare answers across models without installing anything, PicassoIA offers several Claude models in its Large Language Models collection:

This is a separate experience from Claude Code. These pages give you model chat, not a terminal agent with access to your files. A sensible split is to use the browser for planning and questions, then switch to Claude Code when you need edits made inside a real project.

Try It Yourself on PicassoIA

Once your terminal is sorted, put the same curiosity to work on creative projects. PicassoIA brings together text to image, video, audio and language models in one place, so you can draft a script with a Claude model, then turn it into visuals without leaving the site. Browse everything at picassoia.com/en/all-models, pick a model, write a prompt and see what comes back. Start small, tweak your wording, and run it again. That loop of try, adjust and retry is the same one that makes Claude Code useful, and it is just as much fun with pictures.

Smiling developer closing a laptop on a balcony at sunset

Share this article

Choose your language

FreeCreate AI Images and VideosFree, No Credit CardFree Generations to StartSeedance 2.5 Lite IncludedStart Free Now