To turn on the Windows Subsystem for Linux feature, click the checkbox like this:
- To work with WSL, you should have installed at least one distro on your computer.
To install Ubuntu, Run this:
winget install -e --id Canonical.Ubuntu
If you want to install any other distro, you can get it here by searching; https://winget.run/
After installed, To check all the available distros, run this:
- If you get any error, just update the wsl by running
wsl --update. And install the distro again.
After setting up the Unix admin for the respective distro, run this(in your WSL terminal, not in CMD):
curl https://bun.sh/install | bash
If there's any error occurs while unzipping, install the unzip package like this:
sudo apt install unzip
Now you can unzip it, and the installation will be done in seconds.
To check the installed Bun version, run this:
To scrutinize the specialty of Bun, we'll try installing React via Bun.
The following command will create a React project inside the myapp folder.
bun create react ./myapp
Installed path will be like this: wsl.localhost\Ubuntu\home\USER\myapp
To start the React app, run these commands:
cd myapp bun dev
Now you can see your React app by navigating to http://localhost:3000.
All this can take significantly less time than NodeJS. That's the magic what Bun can do.