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.
Run the install script in PowerShell:
powershell -c "irm bun.sh/install.ps1 | iex"
Bun requires Windows 10 version 1809 or later. For the best experience on Windows, use WSL 2 (Windows Subsystem for Linux) and install Bun inside the Linux environment.
npm install -g bun
Bun provides an official Docker image for Linux x64 and arm64:
docker pull oven/bundocker run --rm --init --ulimit memlock=-1:-1 oven/bun
bun --version# 1.x.ybun --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).
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: