install node js lts ubuntu 18.04
To install Node.js LTS on Ubuntu 18.04, follow these steps:
Update the package lists for upgrades and new installations:
sudo apt update
Install the necessary software packages to manage repositories and enable HTTPS connections:
sudo apt install curl apt-transport-https
Download and add the Node.js GPG key to verify the packages' authenticity:
curl -sL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
Install Node.js and npm (Node Package Manager):
sudo apt install nodejs
Verify that Node.js and npm are installed correctly by checking their versions:
node -v npm -v
If the versions are displayed, Node.js and npm are successfully installed.
That's it! You have now installed Node.js LTS on Ubuntu 18.04.