GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

No menu could be recovered. Follow the blue links in the page.

This view

  • Original page
  • New address

GeezerVison is showing bun-docs.vercel.app — Installation | Bun Docs

Get Started

Welcome to BunInstallationQuickstartTypeScriptTypeScript 6 and 7bun initbun create

Core Runtime

Bun RuntimeWatch ModeDebuggingREPLbunfig.toml

File & Module System

File TypesModule ResolutionJSXAuto-installPluginsFile System Router

HTTP Server

ServerRoutingCookiesTLSError HandlingMetricsWebSockets

Networking

FetchTCPUDPDNS

Data & Storage

CookiesFile I/OStreamsBinary DataArchiveSQLSQLiteS3Redis

Concurrency

Workers

Process & System

Environment VariablesShellSpawnWebViewCron

Interop & Tooling

Node-APIFFIC CompilerTranspiler

Utilities

CSRF ProtectionSecretsConsoleMarkdownTOMLYAMLJSON5JSONLXMLHTMLRewriterImageHashingGlobSemverColorUtils

Standards & Compatibility

GlobalsBun APIsWeb APIsNode.js Compatibility

Contributing

RoadmapBenchmarkingContributingBuilding WindowsBindgenLicense
Runtime
Bundler
Package Manager
Test Runner
Guides
Reference
Blog
Install Bun
Runtime Get Started

Installation

Install Bun with npm, Homebrew, Docker, or the official script.

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.

After installation, verify with bun --version and bun --revision.

Installation

curl
$ curl -fsSL https://bun.com/install | bash

Linux 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.

PowerShell
> powershell -c "irm bun.sh/install.ps1|iex"

Bun requires Windows 10 version 1809 or later.

For support and discussion, join the #windows channel on the Discord.

npm
$ npm install -g bun # the last `npm` command you'll ever need
Homebrew
$ brew install oven-sh/bun/bun
Scoop
$ scoop install bun

Bun provides a Docker image that supports both Linux x64 and arm64.

Docker
$ docker pull oven/bun
$ docker run --rm --init --ulimit memlock=-1:-1 oven/bun

Image Variants

Bun also publishes image variants for different operating systems:

Docker
$ docker pull oven/bun:debian
$ docker pull oven/bun:slim
$ docker pull oven/bun:distroless
$ docker pull oven/bun:alpine

To check that Bun was installed successfully, open a new terminal window and run:

terminal
$ bun --version
1.x.y

# See the precise commit of `oven-sh/bun` that you're using
$ bun --revision
1.x.y+b7982ac13189

If 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:

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 latest canary
$ bun upgrade --canary

# Switch back to stable
$ bun upgrade --stable

Use 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:

terminal
$ curl -fsSL https://bun.com/install | bash -s "bun-v1.4.3"

On Windows, pass the version number to the PowerShell install script:

PowerShell
> iex "& {$(irm https://bun.com/install.ps1)} -Version 1.4.3"

Direct Downloads

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

Latest Version Downloads

Linux x64

Standard Linux x64 binary

Linux x64 Baseline

For older CPUs without AVX2

Windows x64

Standard Windows binary

Windows x64 Baseline

For older CPUs without AVX2

Windows ARM64

Windows on ARM (Snapdragon, etc.)

macOS ARM64

Apple Silicon (M1/M2/M3)

macOS x64

Intel Macs

Linux ARM64

ARM64 Linux systems

Musl Binaries

For distributions without glibc (Alpine Linux, Void Linux):

  • Linux x64 musl
  • Linux x64 musl baseline
  • Linux ARM64 musl

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)

PlatformIntel RequirementAMD Requirement
x64Haswell (4th gen Core) or newerExcavator or newer

x64-baseline binaries target the Nehalem architecture for older CPUs

PlatformIntel RequirementAMD Requirement
x64-baselineNehalem (1st gen Core) or newerBulldozer or newer

Baseline builds are slower than regular builds. Use them only if you encounter an "Illegal Instruction" error.

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:

terminal
$ rm -rf ~/.bun
PowerShell
> powershell -c ~\.bun\uninstall.ps1
npm
$ npm uninstall -g bun
Homebrew
$ brew uninstall bun
Scoop
$ scoop uninstall bun

Welcome to Bun

Bun is an all-in-one toolkit for developing modern JavaScript/TypeScript applications.

Quickstart

Build your first app with Bun

On this page

Overview
Installation
Image Variants
Determine which shell you're using
Open your shell configuration file
Add the Bun directory to PATH
Reload your shell configuration
Determine if the bun binary is properly installed
Restart your terminal
Upgrading
Canary Builds
Installing Older Versions
Direct Downloads
Latest Version Downloads
Musl Binaries
CPU Requirements
Uninstall
Feedback
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.