Bun ships as a single, dependency-free executable. Pick the install method that fits your platform.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/oven-sh/bun/llms.txt
Use this file to discover all available pages before exploring further.
Install Bun
- macOS & Linux
- Windows
- Package managers
- Docker
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.
Add Bun to your PATH manually
Add Bun to your PATH manually
Upgrade
Once installed, Bun can upgrade itself: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
- macOS & Linux
- Windows
Pass the git tag to the install script:
Supported platforms
| Platform | Architecture | Notes |
|---|---|---|
| macOS | x64, arm64 | Requires macOS 13.0 or later |
| Linux | x64, arm64 | Kernel 5.6+ recommended; 5.1 minimum |
| Windows | x64 | Windows 10 1809+; WSL 2 recommended |
| Docker | x64, arm64 | Official 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:Uninstall
- macOS & Linux
- Windows
- Package managers
Remove the Then remove the
~/.bun directory:BUN_INSTALL and PATH lines from your shell config file.