diff options
author | 2023-10-14 12:58:30 -0700 | |
---|---|---|
committer | 2023-10-14 12:58:30 -0700 | |
commit | f9add8b6bea4df3cdbd56a21f17e4cab1a854e4e (patch) | |
tree | 8e5306104d81c67b771181337bba02cd9ec39453 /docs/installation.md | |
parent | 81a1a58d66c598ea35c42453d0ba4c6341a940fc (diff) | |
parent | 9b5e66453b0879ed77b71dcdbe50e4efa184261e (diff) | |
download | bun-sdl.tar.gz bun-sdl.tar.zst bun-sdl.zip |
Merge branch 'main' into sdlsdl
Diffstat (limited to 'docs/installation.md')
-rw-r--r-- | docs/installation.md | 62 |
1 files changed, 59 insertions, 3 deletions
diff --git a/docs/installation.md b/docs/installation.md index 73d222eaf..6aa51737a 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -1,9 +1,12 @@ Bun ships as a single executable that can be installed a few different ways. -## macOS and Linux +## Installing + +### macOS and Linux {% callout %} -**Linux users** — The `unzip` package is required to install Bun. Kernel version 5.6 or higher is strongly recommended, but the minimum is 5.1. +**Linux users** — The `unzip` package is required to install Bun. Use `sudo apt install unzip` to install `unzip` package. +Kernel version 5.6 or higher is strongly recommended, but the minimum is 5.1. Use `uname -r` to check Kernel version. {% /callout %} {% codetabs %} @@ -34,7 +37,7 @@ $ proto install bun {% /codetabs %} -## Windows +### Windows Bun provides a _limited, experimental_ native build for Windows. At the moment, only the Bun runtime is supported. @@ -66,6 +69,59 @@ $ docker pull oven/bun:alpine $ docker pull oven/bun:distroless ``` +## Checking installation + +To check that Bun was installed successfully, open a new terminal window and run `bun --version`. + +```sh +$ bun --version +1.x.y +``` + +To see the precise commit of [oven-sh/bun](https://github.com/oven-sh/bun) that you're using, run `bun --revision`. + +```sh +$ bun --revision +1.x.y+b7982ac1318937560f38e0f8eb18f45eaa43480f +``` + +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`. + +{% details summary="How to add to your `PATH`" %} +First, determine what shell you're using: + +```sh +$ echo $SHELL +/bin/zsh # or /bin/bash or /bin/fish +``` + +Then add these lines below to bottom of your shell's configuration file. + +{% codetabs %} + +```bash#~/.zshrc +# add to ~/.zshrc +export BUN_INSTALL="$HOME/.bun" +export PATH="$BUN_INSTALL/bin:$PATH" +``` + +```bash#~/.bashrc +# add to ~/.bashrc +export BUN_INSTALL="$HOME/.bun" +export PATH="$BUN_INSTALL/bin:$PATH" +``` + +```sh#~/.config/fish/config.fish +# add to ~/.config/fish/config.fish +export BUN_INSTALL="$HOME/.bun" +export PATH="$BUN_INSTALL/bin:$PATH" +``` + +{% /codetabs %} +Save the file. You'll need to open a new shell/terminal window for the changes to take effect. + +{% /details %} + ## Upgrading Once installed, the binary can upgrade itself. |