Skip to main content

Overview

Bun ships as a single, dependency-free executable. You can install it on macOS, Linux, and Windows via script, package manager, or Docker.
After installation, verify with bun --version and bun --revision.

Installation

curl -fsSL https://bun.com/install | bash
Linux users — The unzip package is required to install Bun. Install it with sudo apt install unzip. Kernel version 5.6 or higher is strongly recommended, but the minimum is 5.1. Use uname -r to check your kernel version.
To confirm Bun is installed successfully, open a new terminal window and run:
terminal
bun --version
# Example output: 1.x.y

# To see the exact commit of oven-sh/bun you are using
bun --revision
# Example output: 1.x.y+b7982ac13189
If you have Bun installed but see a command not found error, you may need to manually add the install directory (~/.bun/bin) to your PATH.
1

Determine which shell you are using

terminal
echo $SHELL
# Possible outputs: /bin/zsh or /bin/bash or /bin/fish
2

Open your shell profile

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

Add the Bun directory to PATH

Add the following to your profile:
terminal
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
4

Reload your shell profile

terminal
source ~/.bashrc  # or ~/.zshrc

Upgrade

Once installed, the binary can self-upgrade:
terminal
bun upgrade
Homebrew users
To avoid conflicts with Homebrew, use brew upgrade bun instead.
Scoop users
To avoid conflicts with Scoop, use scoop update bun instead.

Canary builds

-> View canary build Bun automatically releases an (untested) canary build on every commit to main. To upgrade to the latest canary build:
terminal
# Upgrade to the latest canary
bun upgrade --canary

# Switch back to stable
bun upgrade --stable
Canary builds are useful for testing new features and bug fixes, and help the Bun team fix issues faster. Canary builds automatically upload crash reports to the Bun team.

Install a specific version

Because Bun is a single binary, you can install a specific version by re-running the install script with a version specified.
To install a specific version, pass a git tag to the install script:
terminal
curl -fsSL https://bun.com/install | bash -s "bun-v1.3.3"

Direct downloads

To directly download Bun binaries, visit the GitHub releases page.

Latest release downloads

https://mintlify.s3.us-west-1.amazonaws.com/zhcndoc-bun/icons/linux.svg

Linux x64

Standard Linux x64 binary
https://mintlify.s3.us-west-1.amazonaws.com/zhcndoc-bun/icons/linux.svg

Linux x64 Baseline

For older CPUs without AVX2
https://mintlify.s3.us-west-1.amazonaws.com/zhcndoc-bun/icons/windows.svg

Windows x64

Standard Windows binary
https://mintlify.s3.us-west-1.amazonaws.com/zhcndoc-bun/icons/windows.svg

Windows x64 Baseline

For older CPUs without AVX2
https://mintlify.s3.us-west-1.amazonaws.com/zhcndoc-bun/icons/windows.svg

Windows ARM64

For ARM-based Windows (Snapdragon, etc.)
https://mintlify.s3.us-west-1.amazonaws.com/zhcndoc-bun/icons/apple.svg

macOS ARM64

Apple Silicon (M1/M2/M3)
https://mintlify.s3.us-west-1.amazonaws.com/zhcndoc-bun/icons/apple.svg

macOS x64

Intel Mac
https://mintlify.s3.us-west-1.amazonaws.com/zhcndoc-bun/icons/linux.svg

Linux ARM64

ARM64 Linux systems

Musl builds

For distributions that don’t support glibc (Alpine Linux, Void Linux, etc.):
If you see errors like bun: /lib/x86_64-linux-gnu/libm.so.6: version GLIBC_2.29 not found, try the musl build. Bun’s install script automatically picks the right binary for your system.

CPU requirements

Bun has different CPU requirements depending on which binary you use:
x64 binaries target the Haswell CPU architecture (requires AVX and AVX2 instruction sets)
PlatformIntel RequirementAMD Requirement
x64Haswell (4th gen Core) and newerExcavator and newer
Bun does not support CPUs older than the baseline target, which requires SSE4.2 instruction support. macOS also requires version 13.0 or higher.

Uninstall

To remove Bun from your system:
terminal
rm -rf ~/.bun

Build docs developers (and LLMs) love