Install node js ubuntu

d32ssv

Arun Prakash Pandey

Posted on October 8, 2023

Install node js ubuntu

This is a guide to installing node js on a Ubuntu machine. You can keep multiple versions of node simultaneously and switch between them as per the requirement.
Follow the below steps for installation :

Run the command ensuring your system is up to date.

sudo apt update
Enter fullscreen mode Exit fullscreen mode

To install the latest stable version, run the command

sudo snap install node --classic
Enter fullscreen mode Exit fullscreen mode

or Visit the Official Snap website to see the list of available versions.

To confirm the installed version of node, run the command

node -v
Enter fullscreen mode Exit fullscreen mode

In case you wish to have more than one version of node installed. Run the command

nvm install v19.9.0
Enter fullscreen mode Exit fullscreen mode

Here v19.9.0 is used as an example and can be replaced by a version of your choice!

To see all the available versions, use the command

nvm list-remote
Enter fullscreen mode Exit fullscreen mode

To see the list of node versions that are installed on your pc, run the command

nvm ls
Enter fullscreen mode Exit fullscreen mode

A similar result to the below image will appear.
list of node

To switch between the versions of node, run the command

nvm use v19.9.0
Enter fullscreen mode Exit fullscreen mode

Here v19.9.0 can be replaced with any other version of node that is installed on the system.

Thanks for reading this. I hope this was helpful. Any comments or reactions will be wholeheartedly appreciated.

💖 💪 🙅 🚩
d32ssv
Arun Prakash Pandey

Posted on October 8, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Install node js ubuntu
node Install node js ubuntu

October 8, 2023