Claude in the browser talks. Claude Code in the terminal works on your files – in a folder you point it at, on your own computer. This lesson takes you to one place: Claude Code installed, logged in, and answering your first instruction inside a folder of your own.
We’ll be working in the terminal, and that’s the part that scares people most. So, up front: depending on your system’s setup, you might need a couple of extra commands – fortunately every one of them is just more copy-paste. You don’t need to know how to operate a terminal or its commands.
If something looks different from the description at any point, don’t panic and don’t close everything. Nearly every terminal message can be read calmly, and hardly any of them mean something broke.
What to have ready
Three things, all checkable in a minute:
- A Claude account on Pro or higher. Claude Code doesn’t run on the free plan – that isn’t a setting to hunt for, it’s a plan boundary. No account yet? Start with the lesson on setting one up, then come back here.
- A computer running a system Claude Code supports. macOS 13 and up, Windows 10 from update 1809 onward, Ubuntu from 20.04. In practice: if your system has had updates in the last few years, you’re fine.
- An internet connection. The installer downloads files over the network, so this won’t work offline (we’re only mentioning it in case someone’s trying to install Claude Code at the literal edge of the world, with zero signal).
You don’t need to install anything else to get started – this one step is enough. Exception: sometimes you’ll see a suggestion to also install Git. It isn’t required for Claude Code to work, but we’d recommend accepting it – it comes in handy for working with code, and on Windows, Claude Code gets a more convenient way into the terminal with it (Bash instead of plain PowerShell).
There is also a route without the terminal: Claude Code has a desktop app, with a window and buttons, downloadable for macOS, Windows, and Linux. If the terminal fills you with pure resistance, that’s a perfectly viable alternative. This lesson takes the terminal route, though, because almost everything you’ll read about Claude Code later – in the docs, on blogs, here – assumes it. Most of the commands you’ll learn here work similarly in the desktop version too.
Find the terminal on your computer
A terminal is a window with a blinking cursor waiting for you to type something – the exact colors and look depend on the program and theme (it might be black, it might be white, the cursor might be a line or a block), but that blinking cursor shows up everywhere. What matters most is that you operate it almost entirely with the keyboard – mouse interaction is heavily limited there, and exactly how much you can do with it depends on the specific terminal and its version.
How to open it:
- Windows: press Windows, type
PowerShell, and click the first result. A window opens showingPS C:\Users\and your username at the start of the line. If the search turns up nothing, PowerShell can be installed free from the Microsoft Store. - macOS: press Command+Space, type
Terminal, and press Enter. - Linux: press Ctrl+Alt+T.
Don’t type anything yet. An open terminal window on its own does nothing, and nothing can be broken by leaving it sitting there.
On Windows it’s worth checking right away: does the line start with PS? If it does, you’re in PowerShell, which is what you want.
Paste one command and wait
Now for that one command. Copy the whole line matching your system and paste it into the terminal. The shortcut Ctrl+V (Command+V on macOS) usually works, but not in every terminal – if nothing happens, or you see strange characters like ^[[200~ instead of the command, try right-clicking: sometimes it pastes right away, sometimes it opens a menu where you pick Paste.
Windows, in PowerShell:
irm https://claude.ai/install.ps1 | iex
macOS and Linux:
curl -fsSL https://claude.ai/install.sh | bash
Press Enter. Lines of text will scroll past for a while – that’s normal, the installer is downloading files and printing what it’s doing. You don’t have to read any of it.
Two messages that sometimes appear here, and what they mean:
The token '&&' is not a valid statement separator– that’s the command for a different kind of window than the one you’re in. Check whether the line starts withPSand use the version matching what you see.'irm' is not recognized– the exact opposite: this window isn’t PowerShell. Close it and open PowerShell as described above.
Neither one breaks anything. Nothing got installed, and you try again.
Check that it worked
Once the scrolling stops and the cursor is blinking again, type:
claude --version
You’ll see a version number, something like 2.1.219 (Claude Code). Yours will be different and higher – Claude Code updates itself in the background, so that’s expected.
If instead of a number you get command not found or is not recognized as a command, the most common cause is a terminal still remembering the state from before the install. Close the terminal window, open a new one, and try again. That fixes it most of the time.
If that didn’t help, Claude Code most likely installed correctly, but the terminal doesn’t yet know where to find it. One command fixes this, for your system:
Windows (PowerShell):
$currentPath = [Environment]::GetEnvironmentVariable('PATH', 'User')
[Environment]::SetEnvironmentVariable('PATH', "$currentPath;$env:USERPROFILE\.local\bin", 'User')
macOS (Zsh):
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
Linux (Bash):
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
Close the terminal, open it again, and check claude --version once more.
If none of these fix it, or you hit a completely different error message, there’s one universal method that always works: copy the error text (or take a screenshot), go to claude.ai and describe what’s happening – which system you’re on and what exactly you’re trying to do. Claude will help you find a fix. It’s worth remembering this method beyond today, too – it comes in handy any time Claude Code stops working for some reason.
There’s one more command worth filing away for later:
claude doctor
claude doctor prints installation and configuration diagnostics, with suggested fixes, without starting a session. You need nothing from it today. In a month, when something starts behaving oddly, it’s the first place to look.
Open your folder
Launching inside a specific folder is the heart of the whole install, so it’s worth pausing here. Claude Code works in the folder you launch it in by default, and won’t leave it – unless you explicitly ask it to.
In the terminal, moving into a folder is done with the cd command and a path. The simplest way: type cd , those two letters and a space, then drag the folder from your file explorer straight onto the terminal window. The path writes itself. Press Enter.
Set up one fixed folder for the projects you work on with Claude Code – something simple, like AI – instead of hunting for a new spot every time. It’s best to avoid spaces in names like this one: write claude-code instead of claude code. A terminal can handle a space too, but it needs extra tricks to do it (quotes, escape characters), and a hyphen just works, no complications.
Log in and start Claude Code
Now start Claude Code in the folder you want to work in with AI:
claude
On first run, Claude Code will ask you to log in. First it asks what kind of account – choose “Claude account with subscription”. That’s the account you should have set up in the lesson on setting one up; the other option, “Anthropic Console account”, is a separate, less commonly used way of paying for API usage, not what you need here. Then your browser opens – sign in with the same Claude account you use on claude.ai and confirm access. Go back to the terminal – it should already be waiting, logged in.
If the browser doesn’t open by itself, the terminal prints an address to copy. Paste it into your browser by hand; the result is the same. Sometimes a link like this pastes split across several lines, and then it simply won’t work – if that happens, paste it into a plain text editor first, turn off line wrapping there (so you can see where the actual line breaks are), stitch it back into one line, and only then move it into your browser.
You log in once. On later runs, Claude Code simply starts.
Right after logging in, two more short questions might show up. First: whether you trust the files in this folder – choose “Yes, proceed”, or Claude Code won’t go any further. Second: which color theme to pick (light or dark, including higher-contrast variants) – pick whichever matches your terminal’s background, so the text stays readable. Both choices are reversible: you can change the theme later with /theme (or from /config), and folder trust can be undone in settings too.
Send your first instruction
Write your first instruction as an ordinary sentence. For example:
Have a look around this folder and tell me in three sentences what's in it.
Claude reads the folder’s contents and answers. That’s the difference the whole of Claude Code is about: you don’t paste files at it, you point it at a directory.
Notice two things in that answer. First, the interface is in English while the conversation follows whatever language you write in – there’s nothing to configure there. Second, before Claude Code changes anything, it asks for your approval. Reading it does on its own; changes it brings to you for confirmation.
To leave, type /exit (plain exit, no slash, works too) or press Ctrl+C twice.
What’s worth doing right after
The install is finished and you can safely close the terminal. One thing is worth doing while it’s all fresh: open the settings with /config and look at which model and which effort level you’re working on.
No need to spell that out here – we’ve got a separate piece on what to change in the config, and what to leave alone – it’s enough to know the command exists and that nothing needs changing on day one. The defaults are sensible and a good starting point.
The second thing, which becomes useful sooner than you’d think: Claude Code can read a file of your standing instructions at the start of every session. It’s called CLAUDE.md and it has a lesson of its own here. You don’t need it yet.
You can also set your terminal to open in that same folder every time – we’ve written a separate tip about it. Typing cd at every start stops being a daily ritual, and you get the setting itself by asking Claude Code for it, with nothing to look up in any configuration.
Tasks
Tick these off as you go. The state is remembered in your browser, so you can come back to this list tomorrow.
- A Claude account on Pro or higher
- Terminal open on my computer
- Install command pasted and finished
-
claude --versionprints a version number -
cdinto my own folder (ideallyAI, no spaces in the name) - Browser login completed, folder marked as trusted
- First instruction sent, answer received
- I know
/configexists and that I don’t have to change anything there today