Installation
Install Bun with npm, Homebrew, Docker, or the official script.
Overview
Bun ships as a single, dependency-free executable. Install it with the install script, a package manager, or Docker on macOS, Linux, and Windows.
bun --version and bun --revision.Installation
curl -fsSL https://bun.com/install | bashLinux users The unzip package is required to install Bun (sudo apt install unzip). Kernel version 5.6 or higher is recommended; Bun runs on kernels as old as 3.10 (RHEL 7) with graceful degradation of newer syscalls. Use uname -r to check your kernel version.
To check that Bun was installed successfully, open a new terminal window and run:
bun --version
# Output: 1.x.y
# See the precise commit of `oven-sh/bun` that you're using
bun --revision
# Output: 1.x.y+b7982ac13189If you’ve installed Bun but are seeing a command not found error, you may have to manually add the installation
directory (~/.bun/bin) to your PATH.
Upgrading
Once installed, the binary can upgrade itself:
bun upgradeHomebrew 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
Bun automatically releases an (untested) canary build on every commit to main. To upgrade to the latest canary build:
# Upgrade to latest canary
bun upgrade --canary
# Switch back to stable
bun upgrade --stableUse a canary build to test new features and bug fixes before they reach a stable release. To help the Bun team fix bugs faster, canary builds automatically upload crash reports.
Installing Older Versions
Since Bun is a single binary, you can install older versions by re-running the installer script with a specific version.
To install a specific version, pass the git tag to the install script:
curl -fsSL https://bun.com/install | bash -s "bun-v1.3.3"Direct Downloads
To download Bun binaries directly, visit the releases page on GitHub.
Latest Version Downloads
Musl Binaries
For distributions without glibc (Alpine Linux, Void Linux):
Bun’s glibc binaries require glibc 2.17 or newer. If you encounter an error like bun: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_... not found, try using the musl binary. Bun’s install script
automatically chooses the correct binary for your system.
CPU Requirements
CPU requirements depend on which binary you’re using:
x64 binaries target the Haswell CPU architecture (AVX and AVX2 instructions required)
| Platform | Intel Requirement | AMD Requirement |
|---|---|---|
| x64 | Haswell (4th gen Core) or newer | Excavator or newer |
Bun does not support CPUs older than the baseline target, which requires the SSE4.2 extension. Bun requires macOS 13.0 or later.
Uninstall
To remove Bun from your system:
rm -rf ~/.bun