Claude Code is Anthropic’s AI coding agent for the terminal. You describe a task in plain language, and it reads your project, edits files, runs commands and tests, and explains what it did, asking for your approval before it changes anything. On Linux it is useful well beyond application code: writing shell scripts, debugging a failing systemd unit, reviewing Nginx or Ansible configs, or explaining an unfamiliar repository.
This guide shows how to install Claude Code on Linux with the official native installer, sign in, run your first task, and keep it updated. The steps work on Ubuntu, Debian, Linux Mint, Fedora, RHEL-family distributions and WSL.
Requirements
- A 64-bit x86 or ARM64 Linux system. Anthropic lists Ubuntu 20.04+, Debian 10+ and Alpine Linux 3.19+ as supported; other current glibc-based distributions such as Fedora and Rocky Linux generally work too.
- At least 4 GB of RAM.
- An internet connection.
- A Claude account with a paid plan (Pro, Max, Team or Enterprise) or a Claude Console account with API billing.
The native installer doesn’t need Node.js.
Step 1 of 3Install Claude Code
Run the official install script as your normal user (not with sudo):
curl -fsSL https://claude.ai/install.sh | bash
The script downloads the claude binary to ~/.local/bin. Open a new terminal and check the version:
claude --version
If you get command not found, ~/.local/bin isn’t on your PATH yet. Add it and reload your shell:
echo 'export PATH=$HOME/.local/bin:$PATH' >> ~/.bashrcsource ~/.bashrc
Note: Anthropic also publishes signed package repositories for apt, dnf and apk. See the Claude Code setup documentation if you prefer to manage it with your package manager.
Step 2 of 3Sign In
Go to a project folder and start Claude Code:
cd ~/myprojectclaude
On first start it asks you to choose a theme and sign in. Pick your Claude subscription or a Console (API) account; a browser window opens for you to approve the login. On a server without a browser, Claude Code shows a URL that you can open on any other device to finish signing in.
Step 3 of 3Run Your First Task
Type requests at the prompt in plain language. A few examples that work well for sysadmins:
- Explain what this repository does and how it is deployed.
- Write a bash script that backs up /etc to a dated tar.gz file in /backup and keeps the last 7 copies.
- Why does nginx -t fail? Fix the config.
Claude Code shows each file edit and command before it runs it and asks for permission. You can approve once, approve for the rest of the session, or say no and give it different instructions.
Useful commands inside Claude Code
| Command | What it does |
|---|---|
/init | Creates a CLAUDE.md file describing the project, which Claude reads at the start of every session |
/model | Switch the Claude model |
/clear | Start a fresh conversation |
/help | List all commands |
Esc | Stop the current action |
Use Claude Code in Scripts
The -p (print) option runs one request without the interactive interface and prints the answer, so you can use Claude Code in shell pipelines and cron jobs:
journalctl -u nginx --since today | claude -p 'Summarize the errors in this log and suggest fixes'
Connect MCP Servers
The Model Context Protocol (MCP) lets Claude Code use extra tools, such as GitHub, a browser or your monitoring system. For example, this adds the official fetch server so Claude can read web pages:
claude mcp add fetch -- uvx mcp-server-fetchclaude mcp list
See our list of the best MCP servers for developers and sysadmins for more.
Update Claude Code
The native install updates itself in the background. To update immediately, or to check the installation if something seems wrong, run:
claude updateclaude doctor
Uninstall Claude Code
Remove the binary and its data. The last command also deletes your settings and session history:
rm -f ~/.local/bin/clauderm -rf ~/.local/share/clauderm -rf ~/.claude ~/.claude.json
Conclusion
Claude Code is now installed and signed in. Start with small, well-defined tasks, keep a CLAUDE.md file in each project, and review every change it proposes before approving it. To compare it with OpenAI’s and Google’s tools, read Claude Code vs Codex CLI vs Antigravity CLI.
How did it make you feel?
