Terminal guide for new users - Claude Code Docs
Documentation Index Fetch the complete documentation index at: /docs/llms.txt Use this file to discover all available pages before exploring further. Skip to main content Assistant Responses are generated using AI and may contain mistakes. You can use Claude Code even if you’ve never used a terminal before. This guide walks you through opening a terminal, installing Claude Code, and your first interactions. macOS and Linux Windows Don’t want to use the terminal?
The Claude Code desktop app lets you skip the terminal entirely. Download it for macOS or Windows , then see the Desktop quickstart to get started. On Linux, install the app with apt by following the Linux install instructions . Install Claude Code on macOS or Linux Follow these steps to install and start Claude Code from a macOS or Linux terminal. Claude Code requires macOS 13.0 or later. See the system requirements for supported Linux distributions.
1 Open a terminal macOS : Press Cmd + Space to open Spotlight Search, type Terminal , and press Enter . Linux : Open your terminal app. On most distributions, press Ctrl + Alt + T or search for “Terminal” in your application menu. A window will appear with a blinking cursor. This is your terminal, where you type commands. 2 Install Claude Code Copy this line, paste it into your terminal ( Cmd + V on macOS, Ctrl + Shift + V on Linux), and press Enter : curl -fsSL https://claude.ai/install.sh | bash This downloads and runs the Claude Code installer from claude.ai.
The command shows no progress while Claude Code downloads, so leave the window open and wait. When the installer finishes, you’ll see “Claude Code successfully installed!” If you see an error instead, check the troubleshooting section below. 3 Start Claude Code Type claude and press Enter : claude If you see command not found: claude , the install directory isn’t on your PATH yet. Follow the ‘command not found: claude’ fix below, then open a new terminal window and try again.
You’ll be prompted to log in with your Claude account. Follow the on-screen instructions. A browser window will open for you to sign in. 4 Start using Claude Code Once logged in, you can start asking Claude questions about your code or anything else. Claude Code runs entirely in text. You type messages and press Enter to send them. A few things to know: You can’t click on things in the terminal. Use the arrow keys to move around.
Press Esc to interrupt Claude if it’s running. Type exit or press Ctrl + D twice on an empty prompt to leave Claude Code. Type /help to see available commands. Install Claude Code on Windows Follow these steps to optionally install Git for Windows, set up PowerShell, and start Claude Code on Windows. Claude Code requires Windows 10 version 1809 or later. See the system requirements for full details. 1 Install Git for Windows (optional) Git for Windows provides Git Bash, which enables the Bash tool.
Without it, Claude Code uses PowerShell instead. You won’t need to learn Git yourself. If you don’t already have it: Go to git-scm.com/downloads/win and download the installer Run the installer. Click Next on each screen to accept the defaults. The installer has many screens, but you don’t need to change anything. If it asks you to choose an editor, keep the default and click Next. When you see “Adjusting your PATH environment,” keep the recommended option selected.
Already have Git? You can skip this step. If you’re not sure, install it anyway. Reinstalling won’t cause problems. 2 Open PowerShell PowerShell is Windows’ built-in terminal for typing commands. It comes pre-installed on every Windows computer. Press Win + X and select Windows PowerShell (or Terminal ) from the menu. A window with a blinking cursor will appear. This is where you’ll type commands. Windows has two command-line programs: PowerShell and CMD.
They look similar but use different commands. Make sure you’re in PowerShell for the next step. How to tell which one you’re in: PowerShell : shows PS C:\Users\YourName> at the start of each line CMD : shows C:\Users\YourName> without the PS 3 Install Claude Code Copy this line, paste it into PowerShell with Ctrl + V or right-click, and press Enter : irm https: // claude.ai / install.ps1 | iex This downloads and runs the Claude Code installer. irm fetches the file and iex runs it.
The command shows no progress while Claude Code downloads, so leave the window open and wait. When the installer finishes, you’ll see “Claude Code successfully installed!” If you see an error instead, check the troubleshooting section below. If you’re in CMD instead of PowerShell, use this command: curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd 4 Start Claude Code Run claude .
If PowerShell says 'claude' is not recognized , the install directory isn’t on your PATH yet. Follow the ‘claude is not recognized’ fix below, then open a new PowerShell window and try again. claude You’ll be prompted to log in with your Claude account. Follow the on-screen instructions. A browser window will open for you to sign in. 5 Start using Claude Code Once logged in, you can start asking Claude questions about your code or anything else.
Claude Code runs entirely in text. You type messages and press Enter to send them. A few things to know: You can’t click on things in the terminal. Use the arrow keys to move around. Press Esc to interrupt Claude if it’s running. Type exit or press Ctrl + D twice on an empty prompt to leave Claude Code. Type /help to see available commands. What’s next? Once you see the Claude Code welcome screen, you’re ready to go.
You don’t need to know how to code. Describe what you want in plain English, and Claude writes the code for you. Build something Claude can create projects from a description: make me a simple webpage that says hello world If Claude asks for your permission before creating or changing files, press Enter to choose Yes and approve. Once Claude creates the files, double-click the HTML file to open it in your browser. Work with files on your computer Claude can read and organize files you already have: look at the screenshots on my Desktop and rename them based on what's in each image Ask questions Claude can explain things, help you learn, or plan out a project: I want to build a personal budget tracker.
What would I need? If you don’t have a project yet, that’s fine. Claude can help you start a new one. Other ways to use Claude Code You don’t have to use the terminal. Claude Code is also available in: VS Code and JetBrains IDEs as editor extensions The desktop app , with no terminal required The web at claude.ai/code for cloud sessions GitHub Actions and GitLab CI/CD for automation Learn more Quickstart : a guided walkthrough of your first project with Claude Code How Claude Code works : understand how Claude reads your files, runs commands, and makes edits Best practices : get better results with effective prompting and project setup Common workflows : step-by-step guides for debugging, testing, refactoring, and more Terminal configuration : customize your terminal for the best Claude Code experience Troubleshooting macOS and Linux troubleshooting If you run into problems installing on macOS or Linux, check these common issues: 'command not found: claude' If you see command not found: claude after installing, the folder where the installer put claude isn’t in your PATH.
The installer prints the exact fix under Setup notes at the end of the install, so run that command, or use the one for your shell below. For Zsh, the macOS default shell: echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc source ~/.zshrc For Bash on Linux: echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc source ~/.bashrc For Bash on macOS, follow the macOS Bash step in fix your PATH instead. Then open a new terminal and try claude again.
If it still isn’t found, check that th
The rest of this page is on the live site.