Core Installation
1. System
Prepare your operating system for AI-powered development. Update Ubuntu, install dependencies, and configure passwordless sudo.
Before anything else, update Ubuntu and install the base dependencies that various tools require.
sudo apt update && sudo apt upgrade -ysudo apt install -y build-essential curl wget unzip git jq ripgrep iproute2 net-toolsWhy does this matter?
build-essential— C/C++ compilers needed to install native packages (Node, Python)curl/wget— all official installers use one of thesegit— Claude Code relies heavily on Git to navigate, commit, and create PRsjq— command-line JSON processor, recommended by the official docs for parsing programmatic mode output (claude -p), and used in hooks and pluginsripgrep— fast file search (rg), used internally by Claude Code to search through source codeiproute2— provides thesscommand to check ports and network connectionsnet-tools— provides thenetstatcommand (classic alternative toss)
Ubuntu WSL already comes with curl, git, and wget, but often in outdated versions. The apt upgrade fixes that.
Passwordless Sudo — Autonomy for Claude Code
Claude Code frequently needs sudo to install tools, configure packages, and adjust the system. Without the configuration below, it gets stuck waiting for the password or you need to manually approve each command — breaking the autonomous workflow.
echo "mh ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/usuario-linuxWhat each part does:
mh— your Linux usernameALL=(ALL:ALL)— can execute any command as any userNOPASSWD: ALL— without prompting for a password/etc/sudoers.d/— directory for auxiliary sudoers configs (safer than editing/etc/sudoersdirectly)
This removes the password barrier for all sudo commands, not just Claude Code's. Suitable for WSL development environments where Linux runs locally, but not recommended for production servers.
Replace mh with your own Linux username. Not sure what it is? Run whoami in the terminal.