sudo apt update
curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -
cat /etc/apt/sources.list.d/nodesource.list
deb https://deb.nodesource.com/node_14.x focal main
deb-src https://deb.nodesource.com/node_14.x focal main
sudo apt -y install nodejs
node -v
v14.18.2
# install nodejs 10.x version
sudo apt update
cd ~
curl -sL https://deb.nodesource.com/setup_10.x -o nodesource_setup.sh
# not important, but can be done
nano nodesource_setup.sh
sudo bash nodesource_setup.sh
sudo apt install nodejs
node install npm -g
node --version
npm --version
Install Nodejs using NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
source ~/.bashrc
nvm install v14.17.1
$ sudo apt install nodejs
****Ubantu****
sudo apt-get install -y nodejs
sudo snap install node --channel=14/stable --classic
nodejs install