Bun started to gain popularity thanks to its marketing that offers performance improvement over current Node.js as the leading Javascript engine.
In this guide you will learn how to install bun into your machine and its difference with Node.js.
Installing Bun
You can install bun using this command.
curl -fsSL https://bun.sh/install | bash
It will automatically add bun to your PATH variable. But you may need to restart the terminal or rerun the shell.
As a ZSH lover, you can run this command to make bun available in your current terminal session.
exec /usr/bin/zsh
Check Bun Version
To check current bun installation version, you can use this command.
bun -v
In my machine, as the time of this article writing, the bun version is
1.0.3
Uninstall Bun
You may want to restart the installation. This is useful to ensure that your installation is correct and has nothing hidden interfere with it.
rm -rf ~/.bun
Whoaa, that is easy. I love it.
Where to Go From Here?
Of course you can check how to install it from the official documentation.
Please visit https://bun.sh/docs/installation for official docs.