<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom"><title>Micah Stubbs's Weblog: homebrew</title><link href="https://micahstubbs.ai/" rel="alternate"/><link href="https://micahstubbs.ai/tags/homebrew.atom" rel="self"/><id>https://micahstubbs.ai/</id><updated>2026-01-26T13:45:44.472470+00:00</updated><author><name>Micah Stubbs</name></author><entry><title>Claude Code starts faster on Ubuntu when installed via Homebrew</title><link href="https://simonwillison.net/2026/Jan/26/claude-code-starts-faster-on-ubuntu-when-installed-via-homebrew/#atom-tag" rel="alternate"/><published>2026-01-26T13:45:44.472470+00:00</published><updated>2026-01-26T13:45:44.472470+00:00</updated><id>https://simonwillison.net/2026/Jan/26/claude-code-starts-faster-on-ubuntu-when-installed-via-homebrew/#atom-tag</id><summary type="html">
    # Claude Code starts faster on Ubuntu when installed via Homebrew

I noticed something today: [Claude Code](https://claude.ai/code) starts up noticeably faster on my Ubuntu machine when I install it via [Homebrew](https://brew.sh) instead of npm.

So I benchmarked it.

#### TIL: Homebrew works on Linux

The same Homebrew that macOS developers have used for years runs on Linux too (apparently since [February 2019](https://brew.sh/2019/02/02/homebrew-2.0.0/#:~:text=02%20February%202019,0:)). Nifty.

Here's the install command:

```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```

#### Installing Claude Code

Once Homebrew is set up:

```bash
brew install --cask claude-code
```

The [Homebrew formula page](https://formulae.brew.sh/cask/claude-code) has the details.

#### The benchmarks

I wrote a [Python script](https://github.com/micahstubbs/claude-code-benchmarks/blob/master/scripts/benchmark_comprehensive.py) using pexpect to measure time-to-first-prompt across different configurations. Each configuration got 3 cold/warm paired measurements.

**Test system:** Ubuntu Linux, Claude Code v2.1.19

| Configuration | Cold (ms) | Cold σ | Warm (ms) | Warm σ |
|--------------|-----------|--------|-----------|--------|
| Homebrew | 2480 | ±631 | **2010** | ±52 |
| Homebrew + `--chrome` | 2216 | ±159 | 2333 | ±282 |
| Node.js (nvm) | 2421 | ±193 | 2334 | ±108 |
| Node.js (nvm) + `--chrome` | 3021 | ±351 | 2480 | ±56 |

The fastest configuration is Homebrew without the `--chrome` flag: **2010ms** warm start. That's our baseline.

#### Percentage difference from baseline

Using Homebrew warm start (2010ms) as the baseline:

| Configuration | Cold | Warm |
|--------------|------|------|
| Homebrew (baseline) | +23% | **0%** |
| Homebrew + `--chrome` | +10% | +16% |
| Node.js (nvm) | +20% | +16% |
| Node.js (nvm) + `--chrome` | +50% | +23% |

The worst case is Node.js with `--chrome` on a cold start: 50% slower than baseline.

#### What's causing the difference?

**NVM overhead:** Node.js via nvm adds ~256ms just for `source nvm.sh &amp;&amp; nvm use 24`. That's unavoidable if you manage Node versions with nvm.

**The `--chrome` flag:** Impact is inconsistent. Sometimes it adds 150ms, sometimes 300ms+. Probably depends on whether Chrome is already running and other system state.

**Cold vs warm:** Cold starts vary significantly (±200-600ms). Warm starts are much more consistent, especially Homebrew without `--chrome` (±52ms stddev).

#### Recommendations

| Use case | Configuration | Expected time |
|----------|--------------|---------------|
| Fastest startup | Homebrew, no flags | ~2.0s |
| With Chrome integration | Homebrew + `--chrome` | ~2.3s |
| Node.js required | nvm, no `--chrome` | ~2.3s |
| Avoid | Node.js + `--chrome` cold start | ~3.0s |

#### Bottom line

Homebrew is about 16% faster than Node.js for warm starts. If you're running Claude Code on Linux and the startup lag bothers you, switching to Homebrew is worth it.

The benchmark code is on [GitHub](https://github.com/micahstubbs/claude-code-benchmarks) if you want to run your own tests.

    
        &lt;p&gt;Tags: &lt;a href="https://micahstubbs.net/tags/claude-code"&gt;claude-code&lt;/a&gt;, &lt;a href="https://micahstubbs.net/tags/homebrew"&gt;homebrew&lt;/a&gt;, &lt;a href="https://micahstubbs.net/tags/linux"&gt;linux&lt;/a&gt;, &lt;a href="https://micahstubbs.net/tags/ubuntu"&gt;ubuntu&lt;/a&gt;, &lt;a href="https://micahstubbs.net/tags/developer-tools"&gt;developer-tools&lt;/a&gt;, &lt;a href="https://micahstubbs.net/tags/cli"&gt;cli&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="claude-code"/><category term="homebrew"/><category term="linux"/><category term="ubuntu"/><category term="developer-tools"/><category term="cli"/></entry></feed>