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:
curl -fsSL https://bun.com/install | bash
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 --version
# 1.x.y

bun --revision
# 1.x.y+b7982ac13189
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

echo $SHELL
# /bin/zsh  or  /bin/bash  or  /bin/fish
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:
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
4

Reload your config

source ~/.zshrc   # or ~/.bashrc

Upgrade

Once installed, Bun can upgrade itself:
bun upgrade
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):
bun upgrade --canary

# Switch back to the latest stable release
bun upgrade --stable
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:
curl -fsSL https://bun.com/install | bash -s "bun-v1.3.3"

Supported platforms

PlatformArchitectureNotes
macOSx64, arm64Requires macOS 13.0 or later
Linuxx64, arm64Kernel 5.6+ recommended; 5.1 minimum
Windowsx64Windows 10 1809+; WSL 2 recommended
Dockerx64, arm64Official images at oven/bun on Docker Hub

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:
curl -fsSL https://bun.com/install | bash -s "bun-v$(bun --version)-baseline"
The baseline build targets Nehalem (Intel 1st-gen Core / AMD Bulldozer) and requires only SSE4.2.

Uninstall

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

Build docs developers (and LLMs) love