Install nodejs in Ubuntu 18.04 LTS using PPA
Installing NodeJS latest LTS version in Ubuntu 18.04 LTS Bionic Beaver using PPA. Steps included to upgrade from 8.x to 10.x version
![Install nodejs in Ubuntu 18.04 LTS using PPA](/content/images/size/w1200/2022/05/nodejs.jpeg)
Install nodejs 8.x LTS version in Ubuntu 18.04 LTS Bionic Beaver
cd ~
curl -sL https://deb.nodesource.com/setup_8.x -o nodesource_setup.sh
sudo bash nodesource_setup.sh
sudo apt-get install nodejs
nodejs -v
As NodeJS 10.x
LTS version is released, use below commands to install the same
cd ~
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
nodejs -v
If you already have NodeJS 8.x LTS version is installed, use below commands for upgrading to NodeJS 10.x
cd ~
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get update
nodejs -v