Onwubiko Chibuike
prince-curie

prince-curie

Installing Bun on Windows 10

Onwubiko Chibuike's photo
Onwubiko Chibuike
·Jul 12, 2022·

2 min read

I recently installed Bun on my windows system. This article is a step-by-step guide on the process involved in doing so. It also includes the challenges I went through to ensure a successful installation. I will assume you have wsl on your local machine and the wsl is running Ubuntu operating system.

Step one

  • Start up Powershell in administrative mode.

Step two

  • Update wsl: This is done by running the command wsl --update in the Powershell terminal. It is important to note that this step is not necessary if your system automatically downloads and installs all updates.

Step three

  • Shutdown wsl: This is done in the Powershell terminal by running the command wsl --shutdown. It is only necessary if you carried out step one.

The rest of the steps will be carried out on wsl. So start wsl.

Step four

  • Install unzip: The unzip package is needed to decompress the incoming files and folders. If you have it already you can skip this step. Else run sudo apt install unzip.

Step five

  • Install Bun: Now to the main task. Run curl https://bun.sh/install | bash.

Step six

  • Set path: When Bun is done downloading. A message will appear on the console showing us the commands needed to set the path. Run these commands to set the path.

If you are still here, cool. We have installed Bun. Now we can try to install packages and start a project or create and run an HTTP server or run the bun --help command to view the help menu.

Lastly, one thing I noticed was how I needed to repeat steps five and six anytime I started wsl. It always returned a Command not found error message.

 
Share this