# Using NVM
sudo apt install curl
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
nvm install node
# Using Node.js setup script
sudo apt install curl -y
curl -sL https://deb.nodesource.com/setup_16.x | sudo bash -
sudo apt install nodejs -y
# If NPM didn't get installed
sudo apt install npm -y
# For another node version use
curl -sL https://deb.nodesource.com/setup_<version>.x | sudo bash -
apt install nodejs npm -y&& npm -v && nodejs -v
curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
apt-get install -y nodejs
curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash - sudo apt-get install -y nodejs