Close Menu
    What's Hot

    YouTube Unblocked Proxy: Overview, Benefits, and Real-World Use Cases

    April 7, 2026

    Linux Kernel Release Frequency Statistics 2026

    April 7, 2026

    How To Use The SSH Login Command

    April 7, 2026
    Facebook X (Twitter) Instagram
    Command Linux
    • About
    • Man Pages
    • Arch Linux
    • Statistics
    • How to
      • Q&A
    • OS
      • Windows
    • Blog
      • Featured
    • MORE
      • Easter Eggs
      • IP Address
    • Write For Us
    • Contact Us
    Command Linux
    Home - How to - How to Install Bun

    How to Install Bun

    WillieBy WillieFebruary 16, 2026Updated:March 27, 2026No Comments4 Mins Read

    Bun is a fast JavaScript runtime that ships as a single binary with zero dependencies. It includes a package manager, test runner, and bundler in one tool. You can install Bun on macOS, Linux, and Windows through several methods.

    This guide covers every way to install Bun, platform-specific requirements, and how to keep it updated.

    What Is Bun?

    Bun is an all-in-one JavaScript runtime built using Zig and JavaScriptCore. It handles package installs, runs scripts, bundles code, and executes tests without extra tooling.

    After you install Bun, run bun --version in a fresh terminal to confirm the setup. Run bun --revision to see the exact build hash.

    How to Install Bun on macOS and Linux

    The fastest way to install Bun on macOS and Linux uses a one-line curl command:

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

    This downloads the correct binary and places it in ~/.bun/bin.

    Linux users need unzip before running the script. If it’s missing, install it with sudo apt install unzip.

    Check your kernel version with the uname command (uname -r). Bun works best on kernel 5.6 or above, though 5.1 is the minimum.

    How to Install Bun on Windows

    Windows users can install Bun through PowerShell:

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

    Bun requires Windows 10 version 1809 or later. Scoop users can run scoop install bun instead.

    Install Bun with Package Managers

    Beyond the curl script, you can install Bun through npm, Homebrew, Scoop, or Docker.

    Operating SystemMethodCommand
    macOSHomebrewbrew install oven-sh/bun/bun
    WindowsScoopscoop install bun
    Any platformnpmnpm install -g bun
    ContainersDockerdocker pull oven/bun

    If bun returns “command not found” after setup, add ~/.bun/bin to your PATH manually.

    Upgrading Bun

    Once you install Bun, the binary can update itself:

    bun upgrade

    Homebrew users should run brew upgrade bun instead. Scoop users should use scoop update bun.

    Canary Builds

    Bun publishes an untested canary build on every commit to main. Run bun upgrade --canary to try it, and bun upgrade --stable to switch back.

    Installing an Older Version of Bun

    Pass a version tag to the install script to grab a specific release:

    curl -fsSL https://bun.com/install | bash -s "bun-v1.3.3"

    Pre-built binaries for every release are on the GitHub releases page.

    Choosing the Right Bun Binary

    Bun distributes different builds for each platform. Standard x64 builds (Linux, Windows) need an AVX2-capable processor. If you get an “Illegal Instruction” error, use the baseline build that only requires SSE4.2.

    macOS ARM64 builds target Apple Silicon (M1 and newer). macOS x64 builds cover older Intel Macs. Linux ARM64 builds work on 64-bit ARM boards and servers.

    Distributions without glibc (like Alpine) need the musl variant. The install script picks the right one automatically. If you see a GLIBC_2.29 not found error, download the musl build from the releases page manually. macOS 13.0 or later is required regardless of chip type.

    Uninstalling Bun

    On macOS and Linux, delete the entire installation directory with rm:

    rm -rf ~/.bun

    Windows users should remove the .bun folder from their home directory and clean up any related PATH entries.

    FAQs

    Does Bun work on all Linux distributions?

    Bun works on most Linux distributions with glibc. Alpine and similar musl-based distros need the musl binary variant, which the installer selects automatically.

    Can I install Bun alongside Node.js?

    Yes. Bun installs into its own directory at ~/.bun and does not interfere with existing Node.js installations on your system.

    What should I do if “bun” returns command not found?

    Add ~/.bun/bin to your shell’s PATH variable. Open your .bashrc or .zshrc file, add the export line, then reload with source.

    How often does Bun release updates?

    Bun pushes canary builds on every commit to main. Stable releases happen regularly, and you can update with a single bun upgrade command.

    Is Bun free to use?

    Bun is open source and released under the MIT license. You can use it in personal and commercial projects at no cost.

    Willie
    • Website

    Willie has over 15 years of experience in Linux system administration and DevOps. After managing infrastructure for startups and enterprises alike, he founded Command Linux to share the practical knowledge he wished he had when starting out. He oversees content strategy and contributes guides on server management, automation, and security.

    Related Posts

    Bash Cut: How to Pull Out Portions of Text from Lines

    March 31, 2026

    How to Use WinSCP for Linux File Transfers

    March 30, 2026

    How to Resolve Exit Code 1 Errors in Kubernetes Containers

    March 28, 2026

    How to Check Memory Size in Linux Using Terminal and GUI

    March 28, 2026
    Top Posts

    What Is XFi Complete?

    January 6, 2026

    SYSTEMD.MOUNT

    February 2, 2026

    WRITE

    March 1, 2026

    TIME

    January 21, 2026
    • Home
    • Contact Us
    • Privacy Policy
    • Terms of Use

    Type above and press Enter to search. Press Esc to cancel.