Skip to main content
Bun ships as a single, dependency-free executable. Pick the install method that fits your platform.
After installation, verify it worked by running bun --version in a new terminal window.

Install Bun

Run the official install script:
The script downloads the correct binary for your system, places it in ~/.bun/bin, and adds it to your PATH.
Linux users — the unzip package is required. Install it first with sudo apt install unzip (Debian/Ubuntu) or the equivalent for your distro. Kernel version 5.6 or higher is strongly recommended; 5.1 is the minimum. Check with uname -r.

Verify the installation

Open a new terminal window and run:
bun --revision shows the exact commit of oven-sh/bun that you’re running, which is useful when reporting bugs.
If you see command not found, your shell may not have picked up the updated PATH. Open a new terminal window, or manually add ~/.bun/bin to your PATH (see below).
1

Find your shell

2

Open your shell config file

  • bash: ~/.bashrc
  • zsh: ~/.zshrc
  • fish: ~/.config/fish/config.fish
3

Add the Bun directory

Add these lines to your config file:
4

Reload your config

Upgrade

Once installed, Bun can upgrade itself:
Homebrew users — use brew upgrade bun to avoid conflicts with Homebrew’s version tracking.Scoop users — use scoop update bun instead.
To upgrade to the latest canary build (built from every commit to main):
Canary builds are untested pre-releases. They automatically upload crash reports to the Bun team to help fix bugs faster.

Install a specific version

Pass the git tag to the install script:

Supported platforms

CPU requirements

The standard x64 binary targets the Haswell architecture and requires AVX2 support (Intel 4th-gen Core / AMD Excavator or newer). If you see an “Illegal Instruction” error on older hardware, use the baseline build instead:
The baseline build targets Nehalem (Intel 1st-gen Core / AMD Bulldozer) and requires only SSE4.2.

Uninstall

Remove the ~/.bun directory:
Then remove the BUN_INSTALL and PATH lines from your shell config file.