How To Install Node.js on Ubuntu 20.04

In this post we will see how to install MySql on Ubuntu 20.04.Here we will be looking at step by step process to install Node.js.There are various way to do this , we will be looking at few different ways to do this :

1.Open your terminal .Now type the command : sudo apt-cache show nodejs to check the version available from ubuntu repository.

Here it is 10.19.0 .

2.Now if you go to website you will find the following versions available.

3.You can install the node js from ubuntu repository by using the following command : sudo apt install nodejs ,Now using this command if you install nodejs the version will be 10.19.0 .if you are ok with it then just provide this command and you are going to install the version which is available in ubuntu repositories now .

4.if you want to install different versions , the latest version then  just go to and click on “other downloads” link.

After clicking on other downloads , you will be directed to other part as shown in the below image :

Now scroll down , you will find this link : installing node.js via package manager .

Once you click on the installing node.js via package manager then you will be able to see this option which says ” Debian and Ubuntu based Linux distributions “

Once you click here , you will be redirected to another place as shown in the following image .

Here the Node.js binary distributions  link going to open the github repository which is node source .
you can directly go there by clicking on this link :

In this link you will get all versions and command available to install nodejs.
You can use command from here .

You can use the following command in terminal now :

curl -fsSL | sudo -E bash -
sudo apt-get install -y nodejs

Once you successfully run this command you can verify the node version with command : node --version

5. Now if you are advanced user and you want to switch between different versions of node js then I’m going to show you one more process.
So for that you can search for nvm on your favorite browser .

First link here is the github link so this is the link we want to use ,The link : . When youscroll down on this github link let mejust scroll down you can see how toinstall the nvm it’s just one command which is this curl command so just copy this command and then go to terminal and paste.

Now in the terminal you will see something like this :

so after this command is finished youcan see “Apending nvm source string to /home/codebind/.bashrc” .so for all the changes to take effect you need to give command : source/.bashrc . in order to just make those changes permanent .

Now let’s see how we can use this nvm so to view all the node.js version.
Type the follwoing command : nvm list-remote in your terminal.
It will give you a long list .

Now to install the Latest version you can give the follwing command :
nvm install v16.13.0

you can check locally available version by following command :
nvm list

 6.So let’s see how we can switch between different versions , to switch between different versions what you can just give this command :
nvm use 'version-number'

So these are the few different ways of installing node.js on your Ubuntu operating system . You can decide which command or which procedure or which option you want to use for the installation of node.js .

Partner Sites

Be the first to comment

Leave a Reply

Your email address will not be published.