How to install Node.js on WSL ubuntu ?
East Bank
Posted on November 14, 2024
First of all check your ubuntu version by entering the following command:
lsb_release-a
Confirm the compatibility of nodejs according to your ubuntu version: here
and then enter following command to download the nodejs setup:
curl -fsSL https://deb.nodesource.com/setup_23.x -o nodesource_setup.sh
for example, if you want to download nodejs 20 replace 23.x by 20.xNow run the setup by entering the following command:
sudo -E bash nodesource_setup.sh
Once its done you will see > successfully configured repository
then enter below command to install the nodejs:
sudo apt install -y nodejs
Enter
node -v
to check version and confirm if nodejs is successfully installed.
Posted on November 14, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.